[PATCH] D73243: [CMake] Refactor iOS simulator/device test configuration generation code for LibFuzzer.

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 16:37:46 PST 2020


delcypher created this revision.
delcypher added reviewers: kubamracek, yln.
Herald added subscribers: Sanitizers, mgorny.
Herald added projects: Sanitizers, LLVM.

In order to do this `FUZZER_SUPPORTED_OS` had to be pulled out of
`lib/fuzzer/CMakeLists.txt` and into the main config so we can use it
from the `test/fuzzer/CMakeList.txt`. `FUZZER_SUPPORTED_OS` currently
has the same value of `SANITIZER_COMMON_SUPPORTED_OS` which preserves
the existing behaviour but this allows us in the future to adjust the
supported platforms independent of `SANITIZER_COMMON_SUPPORTED_OS`. This
mirrors the other sanitizers.

For non-Apple platforms `FUZZER_SUPPORTED_OS` is not defined and
surprisingly this was the behaviour before this patch because
`SANITIZER_COMMON_SUPPORTED_OS` was actually empty. This appears to
not matter right now because the functions that take an `OS` as an
argument seem to ignore it on non-Apple platforms.

While this change tries to be NFC it is technically not because we
now generate an iossim config whereas previously we didn't. This seems
like the right thing to do because the build system was configured to
compile LibFuzzer for iossim but previously we weren't generating a lit
test config for it. The device/simulator testing configs don't run by
default anyway so this shouldn't break testing.

rdar://problem/58798733


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73243

Files:
  compiler-rt/cmake/config-ix.cmake
  compiler-rt/lib/fuzzer/CMakeLists.txt
  compiler-rt/test/fuzzer/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73243.239736.patch
Type: text/x-patch
Size: 4153 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200123/b2c07d1d/attachment.bin>


More information about the llvm-commits mailing list