Skip to content

Commit e32db84

Browse files
authored
Add rust features to print target features
`crt-static` is a rust specific target feature that's absent from llvm feature table, adding it there.
1 parent 4fb54ed commit e32db84

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/rustllvm/PassWrapper.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,9 @@ extern "C" void LLVMRustPrintTargetFeatures(LLVMTargetMachineRef TM) {
425425
for (auto &Feature : FeatTable)
426426
printf(" %-*s - %s.\n", MaxFeatLen, Feature.Key, Feature.Desc);
427427
printf("\n");
428+
// Rust specific target features
429+
printf(" %-*s - %s.\n", MaxFeatLen, "crt-static", "Enables libraries with C Run-time Libraries(CRT) to be statically linked");
430+
printf("\n");
428431

429432
printf("Use +feature to enable a feature, or -feature to disable it.\n"
430433
"For example, rustc -C -target-cpu=mycpu -C "

0 commit comments

Comments
 (0)