-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
target_feature requires embedded LLVM copy to be usable #46181
Copy link
Copy link
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-SIMDArea: SIMD (Single Instruction Multiple Data)Area: SIMD (Single Instruction Multiple Data)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-SIMDArea: SIMD (Single Instruction Multiple Data)Area: SIMD (Single Instruction Multiple Data)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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.