[libFuzzer] Enable for i386
authorJonathan Metzman <metzman@chromium.org>
Tue, 30 Apr 2019 17:58:56 +0000 (17:58 +0000)
committerJonathan Metzman <metzman@chromium.org>
Tue, 30 Apr 2019 17:58:56 +0000 (17:58 +0000)
Summary: Get libFuzzer to build on i386 and fix tests.

Subscribers: mgorny, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D61070

llvm-svn: 359585

compiler-rt/lib/fuzzer/CMakeLists.txt
compiler-rt/test/fuzzer/compressed.test

index 42158cc..3e50c08 100644 (file)
@@ -120,8 +120,8 @@ add_compiler_rt_runtime(clang_rt.fuzzer_no_main
 if(OS_NAME MATCHES "Linux|Fuchsia" AND
    COMPILER_RT_LIBCXX_PATH AND
    COMPILER_RT_LIBCXXABI_PATH)
- macro(partially_link_libcxx name dir arch)
-    if (${arch} MATCHES "i386")
 macro(partially_link_libcxx name dir arch)
+    if(${arch} MATCHES "i386")
       set(EMULATION_ARGUMENT "-m" "elf_i386")
     else()
       set(EMULATION_ARGUMENT "")
index 4c539c2..37ea613 100644 (file)
@@ -1,5 +1,7 @@
 REQUIRES: linux
 REQUIRES: zlib
+# zlib is "supported" on i386 even when only for x86_64, explicitly make i386
+# unsupported by this test.
 UNSUPPORTED: i386
 # Custom mutator should find this bug, w/o custom -- no chance.
 RUN: %cpp_compiler %S/CompressedTest.cpp -o %t-CompressedTestCustom -DCUSTOM_MUTATOR -lz