It seems that target_feature requires the embedded LLVM copy to populate the available target_features.
target_features() in src/librustc_trans/llvm_util.rs iterates on whitelisted lists of features, and check for each if the feature is available, using llvm::LLVMRustHasFeature().
The function comes from src/rustllvm/PassWrapper.cpp, and will return always false if LLVM_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 on simd crate and simd uses target_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.
It seems that
target_featurerequires the embedded LLVM copy to populate the available target_features.target_features()insrc/librustc_trans/llvm_util.rsiterates 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 alwaysfalseifLLVM_RUSTLLVMisn't defined. So if the binded LLVM isn't the embedded copy.I found it when building rustc 1.22 (prestable) as
run-pass/sse2failed. But firefox-57 depends onsimdcrate andsimdusestarget_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.