Page MenuHomePhabricator

Fix bug in `darwin_test_archs()` when the cache variable is set but empty.
ClosedPublic

Authored by delcypher on Sep 12 2019, 5:40 PM.

Details

Summary

If the cache variable named in ${valid_archs} (e.g. DARWIN_osx_BUILTIN_ARCHS)
is set in the cache but is empty then the cache check
if(${valid_archs}) will be false so the function will probe the
compiler but the set(...) command at the end of the function to update
the cache variable will be a no-op. This is because set(...) will not
update an existing cache variable unless the FORCE argument is
provided.

To fix this this patch adds FORCE so the cache is always updated.

rdar://problem/55323665

Diff Detail

Repository
rL LLVM

Event Timeline

delcypher created this revision.Sep 12 2019, 5:40 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptSep 12 2019, 5:40 PM
Herald added subscribers: Restricted Project, mgorny. · View Herald Transcript
vsk accepted this revision.Sep 12 2019, 5:58 PM

Wow, thanks for chasing this down.

This revision is now accepted and ready to land.Sep 12 2019, 5:58 PM

@vsk Thanks for the review.

This revision was automatically updated to reflect the committed changes.