Skip to content

Commit 713da8d

Browse files
committed
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 llvm-svn: 371872
1 parent ef163f5 commit 713da8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function(darwin_test_archs os valid_archs)
113113
endif()
114114
endforeach()
115115
set(${valid_archs} ${working_archs}
116-
CACHE STRING "List of valid architectures for platform ${os}.")
116+
CACHE STRING "List of valid architectures for platform ${os}." FORCE)
117117
endfunction()
118118

119119
# This function checks the host cpusubtype to see if it is post-haswell. Haswell

0 commit comments

Comments
 (0)