[PATCH] D108797: [WIP][compiler-rt] Build fuzzer tests
Leonard Chan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 26 18:53:12 PDT 2021
leonardchan created this revision.
Herald added subscribers: mgorny, dberris.
leonardchan requested review of this revision.
Herald added projects: clang, Sanitizers.
Herald added subscribers: Sanitizers, cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D108797
Files:
clang/cmake/caches/Fuchsia-stage2.cmake
compiler-rt/cmake/Modules/AddCompilerRT.cmake
compiler-rt/lib/fuzzer/tests/CMakeLists.txt
Index: compiler-rt/lib/fuzzer/tests/CMakeLists.txt
===================================================================
--- compiler-rt/lib/fuzzer/tests/CMakeLists.txt
+++ compiler-rt/lib/fuzzer/tests/CMakeLists.txt
@@ -33,7 +33,8 @@
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND
COMPILER_RT_LIBCXX_PATH AND
COMPILER_RT_LIBCXXABI_PATH)
- list(APPEND LIBFUZZER_UNITTEST_CFLAGS -nostdinc++)
+ list(APPEND LIBFUZZER_UNITTEST_CFLAGS -nostdinc++ -fno-exceptions)
+ list(APPEND LIBFUZZER_UNITTEST_LINK_FLAGS -nostdlib++ -fno-exceptions)
endif()
if ("-fvisibility=hidden" IN_LIST LIBFUZZER_CFLAGS)
Index: compiler-rt/cmake/Modules/AddCompilerRT.cmake
===================================================================
--- compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -490,7 +490,7 @@
endif()
add_custom_command(
OUTPUT "${output_bin}"
- COMMAND ${COMPILER_RT_TEST_COMPILER} ${TEST_OBJECTS} -o "${output_bin}"
+ COMMAND ${COMPILER_RT_TEST_CXX_COMPILER} ${TEST_OBJECTS} -o "${output_bin}"
${TEST_LINK_FLAGS}
DEPENDS ${TEST_DEPS}
)
Index: clang/cmake/caches/Fuchsia-stage2.cmake
===================================================================
--- clang/cmake/caches/Fuchsia-stage2.cmake
+++ clang/cmake/caches/Fuchsia-stage2.cmake
@@ -122,6 +122,7 @@
set(RUNTIMES_${target}_CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
set(RUNTIMES_${target}_COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "")
+ set(RUNTIMES_${target}_COMPILER_RT_CAN_EXECUTE_TESTS ON CACHE BOOL "")
set(RUNTIMES_${target}_LIBUNWIND_ENABLE_SHARED OFF CACHE BOOL "")
set(RUNTIMES_${target}_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "")
set(RUNTIMES_${target}_LIBUNWIND_INSTALL_LIBRARY OFF CACHE BOOL "")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108797.369016.patch
Type: text/x-patch
Size: 1891 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210827/0a57548e/attachment.bin>
More information about the cfe-commits
mailing list