[PATCH] D86379: [sanitizer] When building tests on Darwin, always pass -arch and other common flags
Dan Liew via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 31 13:07:35 PDT 2020
delcypher added a comment.
Could you use `get_test_cflags_for_apple_platform platform` instead at all the call site?
================
Comment at: compiler-rt/cmake/config-ix.cmake:221
macro(get_test_cc_for_arch arch cc_out cflags_out)
- if(ANDROID OR ${arch} MATCHES "arm|aarch64")
+ if(NOT APPLE AND (ANDROID OR ${arch} MATCHES "arm|aarch64"))
# This is only true if we are cross-compiling.
----------------
The CMake documentation (https://cmake.org/cmake/help/v3.1/command/if.html) makes it look like (I've not verified this) the operator precedence is
```
NOT (APPLE AND (ANDROID OR ${arch} MATCHES "arm|aarch64"))
```
which is wrong because the second condition has been flipped compared to what existed prior to this patch.
Please explicitly use parentheses here to remove any ambiguity.
I'm guessing you wanted:
```
(NOT APPLE) AND (ANDROID OR ${arch} MATCHES "arm|aarch64"))
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86379/new/
https://reviews.llvm.org/D86379
More information about the llvm-commits
mailing list