Skip to content

Handle versioned dynamic libs when linking#15

Open
dillydill123 wants to merge 23 commits intohermeticbuild:mainfrom
dillydill123:handle-versioned-dynlibs
Open

Handle versioned dynamic libs when linking#15
dillydill123 wants to merge 23 commits intohermeticbuild:mainfrom
dillydill123:handle-versioned-dynlibs

Conversation

@dillydill123
Copy link
Copy Markdown

Using -ldylib with versioned libraries will not work. Instead, use -Clink-arg=-l if .so. if found in the basename of the lib.

dzbarsky and others added 23 commits April 16, 2026 10:12
…hollow rlibs: the RustcMetadata action runs rustc to completion with -Zno-codegen, emitting a .rlib archive. This approach mirrors the one used by buck2 and avoids needing to kill rustc mid-output in order to produce metadata.

While not fixing problems with SVH mismatches when non-determinism, this does simplify the codepath and uses a production tested technique that doesn't have any of the dangers associated with killing the rustc process while it's still active.
Port the sharding wrapper feature from bazelbuild#3774 into the hermeticbuild fork. The implementation wraps rust_test executables when experimental_enable_sharding is set while keeping rustc_compile_action's existing provider-list API for internal and extension callers.

rust_test now scans the returned providers to replace DefaultInfo for the wrapper, so extensions such as prost and wasm-bindgen continue to consume rustc_compile_action without API churn.

Co-authored-by: Brian Duff <bduff@linkedin.com>

Co-authored-by: Codex <noreply@openai.com>
Using `-ldylib` with versioned libraries will not work. Instead, use
`-Clink-arg=-l` if `.so.` if found in the basename of the lib.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants