Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Inherit flags from rustc causes rustc build failures #1321

Closed
clubby789 opened this issue Dec 17, 2024 · 2 comments · Fixed by #1322
Closed

build: Inherit flags from rustc causes rustc build failures #1321

clubby789 opened this issue Dec 17, 2024 · 2 comments · Fixed by #1322

Comments

@clubby789
Copy link
Contributor

clubby789 commented Dec 17, 2024

rust-lang/rust#134425 (comment)

Bisected to #1279

Looks like we get something like

/usr/bin/ld: /rustroot/bin/../lib/LLVMgold.so: error loading plugin: /rustroot/bin/../lib/LLVMgold.so: cannot open sha
red object file: No such file or directory

while running tikv-jemalloc-sys's configure, as well as some

Inherited flag "-fembed-bitcode=all" is not supported by the currently used CC

warnings

@workingjubilee
Copy link
Member

@mrkajetanp

@clubby789
Copy link
Contributor Author

clubby789 commented Dec 17, 2024

Removing the inherited -flto=thin prevents the error.

cc-rs/src/lib.rs

Lines 728 to 729 in 5673a3f

// Checking for compiler flags does not require linking
cmd.arg("-c");

This prevents us from reaching the linker and hitting linker errors

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 a pull request may close this issue.

2 participants