File tree Expand file tree Collapse file tree
libdd-otel-thread-ctx-ffi Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments