summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Liew <dan@su-root.co.uk>2019-09-13 17:31:24 +0000
committerDan Liew <dan@su-root.co.uk>2019-09-13 17:31:24 +0000
commit6d5fb90c19b334aca88b02f489f4d5f805a103ba (patch)
tree69d2b6a97c9b641bd488744e133912fe6646395d
parent4b0918f3e49d407a821d573a3aa41e77a8cfb442 (diff)
downloadcompiler-rt-6d5fb90c19b334aca88b02f489f4d5f805a103ba.tar.gz
Fix bug in `darwin_test_archs()` when the cache variable is set but empty.
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 Reviewers: vsk, kubamracek Subscribers: mgorny, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D67530 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@371872 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--cmake/Modules/CompilerRTDarwinUtils.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/Modules/CompilerRTDarwinUtils.cmake b/cmake/Modules/CompilerRTDarwinUtils.cmake
index 969050bf9..042c8a08d 100644
--- a/cmake/Modules/CompilerRTDarwinUtils.cmake
+++ b/cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -113,7 +113,7 @@ function(darwin_test_archs os valid_archs)
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