This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Cache results of find_darwin_sdk_dir
ClosedPublic

Authored by kubamracek on Jun 27 2017, 10:14 PM.

Details

Summary

This improves find_darwin_sdk_dir to cache the results of executing xcodebuild to find the SDK. Should significantly reduce the CMake re-configure time.

Diff Detail

Repository
rL LLVM

Event Timeline

kubamracek created this revision.Jun 27 2017, 10:14 PM
cmake/Modules/CompilerRTDarwinUtils.cmake
11 ↗(On Diff #104348)

Could you move this change to a separate review and additionally move the variable declaration outside of the function?

36 ↗(On Diff #104348)

Can we move the declaration to top of the file, and then use FORCE to set it at the end of the function?

kubamracek retitled this revision from [cmake] Cache results of find_darwin_sdk_dir and add an option to prefer public SDK to [cmake] Cache results of find_darwin_sdk_dir.
kubamracek edited the summary of this revision. (Show Details)
kubamracek added a reviewer: george.karpenkov.

I've split out the separate change into https://reviews.llvm.org/D35071.

This revision is now accepted and ready to land.Jul 6 2017, 1:44 PM
kubamracek added inline comments.Jul 6 2017, 4:11 PM
cmake/Modules/CompilerRTDarwinUtils.cmake
3–4 ↗(On Diff #105472)

Actually, this doesn't work, as ${sdk_name} isn't available. I'm afraid I'll have to keep this declaration inside the function...

kubamracek updated this revision to Diff 105561.Jul 6 2017, 4:11 PM
This revision was automatically updated to reflect the committed changes.