[PATCH] D67530: Fix bug in `darwin_test_archs()` when the cache variable is set but empty.
Dan Liew via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 12 17:42:13 PDT 2019
delcypher created this revision.
delcypher added reviewers: vsk, kubamracek.
Herald added subscribers: Sanitizers, mgorny.
Herald added projects: LLVM, Sanitizers.
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
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D67530
Files:
cmake/Modules/CompilerRTDarwinUtils.cmake
Index: cmake/Modules/CompilerRTDarwinUtils.cmake
===================================================================
--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -113,7 +113,7 @@
endif()
endforeach()
set(${valid_archs} ${working_archs}
- CACHE STRING "List of valid architectures for platform ${os}.")
+ CACHE STRING "List of valid architectures for platform ${os}." FORCE)
endfunction()
# This function checks the host cpusubtype to see if it is post-haswell. Haswell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67530.220030.patch
Type: text/x-patch
Size: 540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190913/9625492d/attachment.bin>
More information about the llvm-commits
mailing list