[compiler-rt] r371872 - Fix bug in `darwin_test_archs()` when the cache variable is set but empty.
Dan Liew via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 13 10:31:24 PDT 2019
Author: delcypher
Date: Fri Sep 13 10:31:24 2019
New Revision: 371872
URL: http://llvm.org/viewvc/llvm-project?rev=371872&view=rev
Log:
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
Modified:
compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake
Modified: compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake?rev=371872&r1=371871&r2=371872&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake Fri Sep 13 10:31:24 2019
@@ -113,7 +113,7 @@ function(darwin_test_archs os valid_arch
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
More information about the llvm-commits
mailing list