This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Use C_STANDARD instead of custom logic for adding -std=c11
ClosedPublic

Authored by mstorsjo on Apr 24 2022, 3:39 AM.

Details

Summary

Apply this in add_compiler_rt_runtime instead of manually adding it
to the individual projects. This applies the option on more
parts of compiler-rt than before, but should ideally not make any
difference assuming the other runtimes that lacked the option
also were C11 compatible.

Not marking this as required, to match the existing behaviour (where
-std=c11 was added only if supported by the compiler).

This was suggested during the review of D110005.

Diff Detail

Event Timeline

mstorsjo created this revision.Apr 24 2022, 3:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 24 2022, 3:39 AM
mstorsjo requested review of this revision.Apr 24 2022, 3:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 24 2022, 3:39 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
phosek accepted this revision.Apr 24 2022, 1:10 PM

LGTM

This revision is now accepted and ready to land.Apr 24 2022, 1:10 PM
phosek added inline comments.Apr 24 2022, 1:11 PM
compiler-rt/cmake/Modules/AddCompilerRT.cmake
382–385

This can be combined into a single invocation.

mstorsjo updated this revision to Diff 424799.Apr 24 2022, 2:39 PM

Merged the two set_target_properties statements into one.

Sorry about that! I've pushed a revert commit now.

Are you able to figure out why this change broke that configuration?

Sorry about that! I've pushed a revert commit now.

Are you able to figure out why this change broke that configuration?

Thanks.
No, I just reverted it locally to make sure this is the one that broke the build and did not look into the configuration.