Skip to content

Commit abf827e

Browse files
committed
ci: fix build error by relaxing need for system wide lld
1 parent 3da7d3e commit abf827e

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

libdd-otel-thread-ctx-ffi/build.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@ fn main() {
1717
// Passing our own version script with an explicit `global:` entry for the
1818
// symbol beats the `local: *` wildcard and prevents that relaxation.
1919
//
20-
// Merging multiple version scripts is not supported by GNU ld, so we also
21-
// force lld explicitly.
20+
// Merging multiple version scripts is not supported by GNU ld, but lld (or rather rust-lld) is
21+
// the default linker picked by Rust since v1.70+. We use to force lld via:
22+
// `println!("cargo:rustc-cdylib-link-arg=-fuse-ld=lld")` but this caused extra pain in CI
23+
// because it requires a system wide lld install (instead of using rust-lld). Since we have a
24+
// test to check that the symbol was properly propagated, we rather let Rust pick lld which is
25+
// preferred anyway, and if it's not possible in an exotic build setup, the test should catch
26+
// it.
2227
if target_os == "linux" {
2328
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
24-
println!("cargo:rustc-cdylib-link-arg=-fuse-ld=lld");
2529
println!(
2630
"cargo:rustc-cdylib-link-arg=-Wl,--version-script={manifest_dir}/tls-dynamic-list.txt"
2731
);

0 commit comments

Comments
 (0)