Skip to content

Commit f42615a

Browse files
author
Naseschwarz
committed
Add rustc's sysroot/lib to LD_LIBRARY_PATH
The default way to use rust is rustup. Rustup maintains its own sysroot. This is fine for most rust applications, as they don't dynamically link to anything in that sysroot. rustfmt does, however, and thus must be called with the correct LD_LIBRARY_PATH.
1 parent c6c8159 commit f42615a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bootstrap.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
cargo build --release
88

9+
export LD_LIBRARY_PATH="$(rustc --print sysroot)/lib:${LD_LIBRARY_PATH}"
10+
911
target/release/rustfmt src/lib.rs
1012
target/release/rustfmt src/bin/main.rs
1113
target/release/rustfmt src/cargo-fmt/main.rs

0 commit comments

Comments
 (0)