Skip to content

Commit

Permalink
Rollup merge of #73346 - aszenz:patch-1, r=cuviper
Browse files Browse the repository at this point in the history
Add rust specific features to print target features

Fixes #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.
  • Loading branch information
RalfJung committed Jun 19, 2020
2 parents 3b4bec2 + caffb28 commit 8d79ebd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/rustllvm/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,12 @@ extern "C" void LLVMRustPrintTargetFeatures(LLVMTargetMachineRef TM) {
printf("Available features for this target:\n");
for (auto &Feature : FeatTable)
printf(" %-*s - %s.\n", MaxFeatLen, Feature.Key, Feature.Desc);
printf("\nRust-specific features:\n");
printf(" %-*s - %s.\n",
MaxFeatLen,
"crt-static",
"Enables libraries with C Run-time Libraries(CRT) to be statically linked"
);
printf("\n");

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

0 comments on commit 8d79ebd

Please sign in to comment.