[compiler-rt] [compiler-rt] [Darwin] libFuzzer tests should use darwin_filter_host_archs (PR #160578)

Dan Blackwell via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 25 04:27:00 PDT 2025


================
@@ -63,10 +63,16 @@ if ("-fvisibility=hidden" IN_LIST LIBFUZZER_CFLAGS)
   list(APPEND LIBFUZZER_UNITTEST_CFLAGS "-fvisibility=hidden")
 endif()
 
-if(COMPILER_RT_DEFAULT_TARGET_ARCH IN_LIST FUZZER_SUPPORTED_ARCH)
-  # libFuzzer unit tests are only run on the host machine.
-  set(arch ${COMPILER_RT_DEFAULT_TARGET_ARCH})
+if(COMPILER_RT_CAN_EXECUTE_TESTS)
+  set(FUZZER_TEST_ARCH ${FUZZER_SUPPORTED_ARCH})
----------------
DanBlackwell wrote:

NIT: maybe this set should move inside of the `if (APPLE)`; I think you need this because `darwin_filter_host_archs` takes an input and output, but on the else branch it feels redundant to set this twice.

https://github.com/llvm/llvm-project/pull/160578


More information about the llvm-commits mailing list