[PATCH] D47296: [libFuzzer] [NFC] Support multi-arch and multi-OS building and testing

Peter Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 15 06:17:50 PDT 2018


Lekensteyn added inline comments.


================
Comment at: compiler-rt/trunk/cmake/config-ix.cmake:195
 set(ALL_DFSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64})
-set(ALL_FUZZER_SUPPORTED_ARCH x86_64)
+set(ALL_FUZZER_SUPPORTED_ARCH ${X86_64} ${ARM64})
 
----------------
This breaks the Android builder: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-android/builds/11681
```
-- LLVM host triple: aarch64-unknown-linux-gnu
-- LLVM default target triple: aarch64-unknown-linux-gnu
-- Building with -fPIC
-- Constructing LLVMBuild project information
-- Linker detection: GNU ld
-- Targeting ARM
-- Targeting AArch64
-- Compiler-RT supported architectures: aarch64
-- Builtin supported architectures: aarch64
CMake Error at projects/compiler-rt/cmake/config-ix.cmake:139 (message):
  Unsupported architecture: x86_64
Call Stack (most recent call first):
  projects/compiler-rt/cmake/Modules/CompilerRTCompile.cmake:47 (get_target_flags_for_arch)
  projects/compiler-rt/cmake/Modules/AddCompilerRT.cmake:362 (sanitizer_test_compile)
  projects/compiler-rt/lib/fuzzer/tests/CMakeLists.txt:53 (generate_compiler_rt_tests)
```

Previously, when `-DLLVM_TARGETS_TO_BUILD="ARM;AArch64"`, then `DLLVM_TARGETS_TO_BUILD='"'"'ARM;AArch64` would end up with an empty list. As a result, `COMPILER_RT_HAS_FUZZER` is FALSE and the `fuzzer` subdirectory is not added.

With this change, the fuzzer directory will be added, but its test suite configuration assumes that the host target (x86_64) is always available:
```
# libFuzzer unit tests are only run on the host machine.
set(arch "x86_64")
```

Could you have a look at this?


Repository:
  rL LLVM

https://reviews.llvm.org/D47296





More information about the llvm-commits mailing list