[CMake] Update internal libc++ configuration
authorPetr Hosek <phosek@google.com>
Mon, 13 Dec 2021 19:03:07 +0000 (11:03 -0800)
committerPetr Hosek <phosek@google.com>
Mon, 13 Dec 2021 19:07:53 +0000 (11:07 -0800)
This is an attempt to address 458ead66dc378ee5b9cbeb453a9cb7c3de768b2e
by better matching the previous configuration.

compiler-rt/cmake/Modules/AddCompilerRT.cmake
compiler-rt/lib/fuzzer/CMakeLists.txt

index b69833c..3ae9425 100644 (file)
@@ -635,9 +635,11 @@ macro(add_custom_libcxx name prefix)
                -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY
                -DLLVM_PATH=${LLVM_MAIN_SRC_DIR}
                -DLLVM_ENABLE_RUNTIMES=libcxx|libcxxabi
+               -DLIBCXXABI_ENABLE_EXCEPTIONS=ON
                -DLIBCXXABI_ENABLE_SHARED=OFF
                -DLIBCXXABI_HERMETIC_STATIC_LIBRARY=ON
                -DLIBCXXABI_INCLUDE_TESTS=OFF
+               -DLIBCXX_ENABLE_EXCEPTIONS=OFF
                -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
                -DLIBCXX_ENABLE_SHARED=OFF
                -DLIBCXX_HERMETIC_STATIC_LIBRARY=ON
index 3b9d7b7..b44569d 100644 (file)
@@ -162,8 +162,7 @@ if(OS_NAME MATCHES "Linux|Fuchsia" AND
       CMAKE_ARGS -DCMAKE_CXX_COMPILER_WORKS=ON
                  -DCMAKE_POSITION_INDEPENDENT_CODE=ON
                  -DLIBCXXABI_ENABLE_EXCEPTIONS=OFF
-                 -DLIBCXX_ABI_NAMESPACE=__Fuzzer
-                 -DLIBCXX_ENABLE_EXCEPTIONS=OFF)
+                 -DLIBCXX_ABI_NAMESPACE=__Fuzzer)
     target_compile_options(RTfuzzer.${arch} PRIVATE -isystem ${LIBCXX_${arch}_PREFIX}/include/c++/v1)
     add_dependencies(RTfuzzer.${arch} libcxx_fuzzer_${arch}-build)
     target_compile_options(RTfuzzer_main.${arch} PRIVATE -isystem ${LIBCXX_${arch}_PREFIX}/include/c++/v1)