This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Use CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
ClosedPublic

Authored by smeenai on Mar 4 2022, 5:56 PM.

Details

Summary

Now that our minimum required CMake version is past 3.6, we can use
CMAKE_TRY_COMPILE_PLATFORM_VARIABLES instead of relying on environment
variable trickery. The two aren't entirely equivalent because
CMAKE_TRY_COMPILE_PLATFORM_VARIABLES is only used for try_compiles of
source files and not whole projects, but I ran LLVM configures before
and after this change and the generated CMakeCache.txt files were
identical, so this should be NFC for us.

Diff Detail

Event Timeline

smeenai created this revision.Mar 4 2022, 5:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 4 2022, 5:56 PM
Herald added a subscriber: mgorny. · View Herald Transcript
smeenai requested review of this revision.Mar 4 2022, 5:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 4 2022, 5:56 PM
thakis accepted this revision.Mar 7 2022, 8:25 AM

lgtm

This revision is now accepted and ready to land.Mar 7 2022, 8:25 AM
This revision was landed with ongoing or failed builds.Mar 8 2022, 3:25 PM
This revision was automatically updated to reflect the committed changes.