[compiler-rt] r334528 - Revert r334458, r334220, r334212, r334139.
Matt Morehouse via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 12 12:43:40 PDT 2018
Author: morehouse
Date: Tue Jun 12 12:43:40 2018
New Revision: 334528
URL: http://llvm.org/viewvc/llvm-project?rev=334528&view=rev
Log:
Revert r334458, r334220, r334212, r334139.
Reverts changes to AddCompilerRT.cmake due to breakage of
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/.
Modified:
compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
compiler-rt/trunk/lib/fuzzer/CMakeLists.txt
Modified: compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake?rev=334528&r1=334527&r2=334528&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake Tue Jun 12 12:43:40 2018
@@ -474,6 +474,11 @@ macro(add_custom_libcxx name prefix)
endif()
cmake_parse_arguments(LIBCXX "USE_TOOLCHAIN" "" "DEPS;CFLAGS;CMAKE_ARGS" ${ARGN})
+ foreach(flag ${LIBCXX_CFLAGS})
+ set(flagstr "${flagstr} ${flag}")
+ endforeach()
+ set(LIBCXX_C_FLAGS ${flagstr})
+ set(LIBCXX_CXX_FLAGS ${flagstr})
if(LIBCXX_USE_TOOLCHAIN)
set(compiler_args -DCMAKE_C_COMPILER=${COMPILER_RT_TEST_COMPILER}
@@ -509,43 +514,8 @@ macro(add_custom_libcxx name prefix)
add_custom_target(${name}-clobber
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${name}-clobber-stamp)
- set(PASSTHROUGH_VARIABLES
- CMAKE_C_COMPILER_TARGET
- CMAKE_CXX_COMPILER_TARGET
- CMAKE_INSTALL_PREFIX
- CMAKE_MAKE_PROGRAM
- CMAKE_LINKER
- CMAKE_AR
- CMAKE_RANLIB
- CMAKE_NM
- CMAKE_OBJCOPY
- CMAKE_OBJDUMP
- CMAKE_STRIP
- CMAKE_SYSROOT
- CMAKE_SYSTEM_NAME)
- foreach(variable ${PASSTHROUGH_VARIABLES})
- if(${variable})
- list(APPEND CMAKE_PASSTHROUGH_VARIABLES -D${variable}=${${variable}})
- endif()
- endforeach()
-
- string(REPLACE ";" " " FLAGS_STRING "${LIBCXX_CFLAGS}")
- set(LIBCXX_C_FLAGS "${CMAKE_C_FLAGS} ${FLAGS_STRING}")
- set(LIBCXX_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAGS_STRING}")
- string(REPLACE "-Wno-maybe-uninitialized" "" LIBCXX_C_FLAGS "${LIBCXX_C_FLAGS}")
- string(REPLACE "-Wno-maybe-uninitialized" "" LIBCXX_CXX_FLAGS "${LIBCXX_CXX_FLAGS}")
-
-
- string(REPLACE "-Wl,-z,defs" "" LIBCXX_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
- string(REPLACE "-Wl,-z,defs" "" LIBCXX_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}")
- string(REPLACE "-Wl,-z,defs" "" LIBCXX_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
-
- # The libc++ sources are fundamentally non-modular. They need special
- # versions of the headers in order to provide C++03 and legacy ABI definitions.
- # NOTE: The public headers can be used with modules in all other contexts
- if (LLVM_ENABLE_MODULES)
- set(LIBCXX_CXX_FLAGS "${LIBCXX_CXX_FLAGS} -Wno-unused-command-line-argument")
- set(LIBCXX_CXX_FLAGS "${LIBCXX_CXX_FLAGS} -fno-modules")
+ if(CMAKE_SYSROOT)
+ set(sysroot_arg -DCMAKE_SYSROOT=${CMAKE_SYSROOT})
endif()
ExternalProject_Add(${name}
@@ -554,14 +524,13 @@ macro(add_custom_libcxx name prefix)
SOURCE_DIR ${COMPILER_RT_LIBCXX_PATH}
STAMP_DIR ${STAMP_DIR}
BINARY_DIR ${BINARY_DIR}
- CMAKE_ARGS ${CMAKE_PASSTHROUGH_VARIABLES}
+ CMAKE_ARGS -DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
${compiler_args}
+ ${sysroot_arg}
-DCMAKE_C_FLAGS=${LIBCXX_C_FLAGS}
-DCMAKE_CXX_FLAGS=${LIBCXX_CXX_FLAGS}
- -DCMAKE_SHARED_LINKER_FLAGS=${LIBCXX_SHARED_LINKER_FLAGS}
- -DCMAKE_MODULE_LINKER_FLAGS=${LIBCXX_MODULE_LINKER_FLAGS}
- -DCMAKE_EXE_LINKER_FLAGS=${LIBCXX_EXE_LINKER_FLAGS}
-DCMAKE_BUILD_TYPE=Release
+ -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DLLVM_PATH=${LLVM_MAIN_SRC_DIR}
-DLLVM_BINARY_DIR=${prefix}
-DLLVM_LIBRARY_OUTPUT_INTDIR=${prefix}/lib
Modified: compiler-rt/trunk/lib/fuzzer/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/fuzzer/CMakeLists.txt?rev=334528&r1=334527&r2=334528&view=diff
==============================================================================
--- compiler-rt/trunk/lib/fuzzer/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/fuzzer/CMakeLists.txt Tue Jun 12 12:43:40 2018
@@ -105,7 +105,6 @@ if(OS_NAME MATCHES "Linux|Fuchsia" AND C
-fvisibility=hidden
CMAKE_ARGS -DCMAKE_CXX_COMPILER_WORKS=ON
-DLIBCXX_ENABLE_EXCEPTIONS=OFF
- -DLIBCXX_ENABLE_SHARED=OFF
-DLIBCXX_CXX_ABI=none)
target_compile_options(RTfuzzer.${arch} PRIVATE -isystem ${LIBCXX_${arch}_PREFIX}/include/c++/v1)
add_dependencies(RTfuzzer.${arch} libcxx_fuzzer_${arch}-build)
More information about the llvm-commits
mailing list