Rollup merge of #73346 - aszenz:patch-1, r=cuviper

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.
This commit is contained in:
Ralf Jung 2020-06-19 08:56:12 +02:00 committed by GitHub
commit 8d79ebd09b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"