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 @@ -26,8 +26,14 @@ inline the C wrapper at link time. The requirements are:
2626 some musl-based distro like Alpine might have Rust packages without LLD)
2727- lld version is at least 19 (TLSDESC support)
2828
29- If those requirements are met, you can use the small wrapper provided in this
30- directory to build an optimized release version where the C shim is inlined.
29+ If those requirements are met, you can use the small wrapper script provided in
30+ this directory to build an optimized release version where the C shim is
31+ inlined. A wrapper script is needed because cross-language LTO requires two
32+ ` rustc ` codegen flags (` -Clinker-plugin-lto ` and ` -Clinker=clang ` ) that cannot
33+ be set from a Cargo build script — they must come from ` RUSTFLAGS ` or
34+ ` .cargo/config.toml ` . The script sets them via the target-scoped
35+ ` CARGO_TARGET_<TRIPLE>_RUSTFLAGS ` env var so they don't leak to build scripts
36+ or proc-macros.
3137
3238``` bash
3339./build-optimized.sh
You can’t perform that action at this time.
0 commit comments