Skip to content

Commit c51d0ac

Browse files
authoredJun 18, 2020
Rollup merge of rust-lang#73346 - aszenz:patch-1, r=cuviper
Add rust specific features to print target features Fixes rust-lang#71583 `crt-static` is a rust specific target feature that's absent from llvm feature table, adding it there so that it shows under `rustc --print target-features`. Probably the most native implementation I could think of, would love to get feedback.
2 parents 3ff4fac + caffb28 commit c51d0ac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/rustllvm/PassWrapper.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,12 @@ extern "C" void LLVMRustPrintTargetFeatures(LLVMTargetMachineRef TM) {
424424
printf("Available features for this target:\n");
425425
for (auto &Feature : FeatTable)
426426
printf(" %-*s - %s.\n", MaxFeatLen, Feature.Key, Feature.Desc);
427+
printf("\nRust-specific features:\n");
428+
printf(" %-*s - %s.\n",
429+
MaxFeatLen,
430+
"crt-static",
431+
"Enables libraries with C Run-time Libraries(CRT) to be statically linked"
432+
);
427433
printf("\n");
428434

429435
printf("Use +feature to enable a feature, or -feature to disable it.\n"

0 commit comments

Comments
 (0)