-
Notifications
You must be signed in to change notification settings - Fork 13.4k
target_feature requires embedded LLVM copy to be usable #46181
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
the error I have while building stock firefox-57 on openbsd with rustc 1.22:
|
Isn't Anyway, AFAIK |
it seems the issue was already present with rust-1.21.0: freebsd already saw it: freebsd bug 223300 at openbsd, rust-1.21.0 was compiled with embedded LLVM. this one with system LLVM. so I only saw it now. about firefox, it seems that firefox explicitely enable the build with simd for performance reason. see firefox 1261841 |
firefox enable nightly features for simd: config/rules.mk#875 |
Then Firefox is cheating -- but you still have the option to build it without simd, it seems. |
with #49428, the problem should be solved. thanks. |
It seems that
target_feature
requires the embedded LLVM copy to populate the available target_features.target_features()
insrc/librustc_trans/llvm_util.rs
iterates on whitelisted lists of features, and check for each if the feature is available, usingllvm::LLVMRustHasFeature()
.The function comes from
src/rustllvm/PassWrapper.cpp
, and will return alwaysfalse
ifLLVM_RUSTLLVM
isn't defined. So if the binded LLVM isn't the embedded copy.I found it when building rustc 1.22 (prestable) as
run-pass/sse2
failed. But firefox-57 depends onsimd
crate andsimd
usestarget_feature
: it makes firefox unbuildable in such situation.As for distro, it is really a common thing to avoid embedded copy of code, it is really annoying.
The text was updated successfully, but these errors were encountered: