[compiler-rt] r359579 - Revert "[compiler-rt] Simple crtbegin.o and crtend.o implementation"
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 30 10:32:05 PDT 2019
Author: phosek
Date: Tue Apr 30 10:32:05 2019
New Revision: 359579
URL: http://llvm.org/viewvc/llvm-project?rev=359579&view=rev
Log:
Revert "[compiler-rt] Simple crtbegin.o and crtend.o implementation"
This reverts commit r359576 since it's failing on Windows bots.
Removed:
compiler-rt/trunk/lib/crt/
compiler-rt/trunk/test/crt/
Modified:
compiler-rt/trunk/CMakeLists.txt
compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
compiler-rt/trunk/cmake/config-ix.cmake
compiler-rt/trunk/lib/CMakeLists.txt
compiler-rt/trunk/test/CMakeLists.txt
Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=359579&r1=359578&r2=359579&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Tue Apr 30 10:32:05 2019
@@ -29,8 +29,6 @@ include(CompilerRTUtils)
option(COMPILER_RT_BUILD_BUILTINS "Build builtins" ON)
mark_as_advanced(COMPILER_RT_BUILD_BUILTINS)
-option(COMPILER_RT_BUILD_CRT "Build crtbegin.o/crtend.o" ON)
-mark_as_advanced(COMPILER_RT_BUILD_CRT)
option(COMPILER_RT_BUILD_SANITIZERS "Build sanitizers" ON)
mark_as_advanced(COMPILER_RT_BUILD_SANITIZERS)
option(COMPILER_RT_BUILD_XRAY "Build xray" ON)
Modified: compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake?rev=359579&r1=359578&r2=359579&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake Tue Apr 30 10:32:05 2019
@@ -132,7 +132,7 @@ endmacro()
# Adds static or shared runtime for a list of architectures and operating
# systems and puts it in the proper directory in the build and install trees.
# add_compiler_rt_runtime(<name>
-# {OBJECT|STATIC|SHARED}
+# {STATIC|SHARED}
# ARCHS <architectures>
# OS <os list>
# SOURCES <source files>
@@ -144,8 +144,8 @@ endmacro()
# PARENT_TARGET <convenience parent target>
# ADDITIONAL_HEADERS <header files>)
function(add_compiler_rt_runtime name type)
- if(NOT type MATCHES "^(OBJECT|STATIC|SHARED)$")
- message(FATAL_ERROR "type argument must be OBJECT, STATIC or SHARED")
+ if(NOT type MATCHES "^(STATIC|SHARED)$")
+ message(FATAL_ERROR "type argument must be STATIC or SHARED")
return()
endif()
cmake_parse_arguments(LIB
@@ -204,10 +204,7 @@ function(add_compiler_rt_runtime name ty
message(FATAL_ERROR "Architecture ${arch} can't be targeted")
return()
endif()
- if(type STREQUAL "OBJECT")
- set(libname "${name}-${arch}")
- set_output_name(output_name_${libname} ${name}${COMPILER_RT_OS_SUFFIX} ${arch})
- elseif(type STREQUAL "STATIC")
+ if(type STREQUAL "STATIC")
set(libname "${name}-${arch}")
set_output_name(output_name_${libname} ${name} ${arch})
else()
@@ -273,34 +270,12 @@ function(add_compiler_rt_runtime name ty
set(COMPONENT_OPTION COMPONENT ${libname})
endif()
- if(type STREQUAL "OBJECT")
- string(TOUPPER ${CMAKE_BUILD_TYPE} config)
- get_property(cflags SOURCE ${sources_${libname}} PROPERTY COMPILE_FLAGS)
- separate_arguments(cflags)
- add_custom_command(
- OUTPUT ${output_dir_${libname}}/${output_name_${libname}}.o
- COMMAND ${CMAKE_C_COMPILER} ${sources_${libname}} ${cflags} ${extra_cflags_${libname}} -c -o ${output_dir_${libname}}/${output_name_${libname}}.o
- DEPENDS ${sources_${libname}}
- COMMENT "Building C object ${output_name_${libname}}.o")
- add_custom_target(${libname} DEPENDS ${output_dir_${libname}}/${output_name_${libname}}.o)
- install(FILES ${output_dir_${libname}}/${output_name_${libname}}.o
- DESTINATION ${install_dir_${libname}}
- ${COMPONENT_OPTION})
- else()
- add_library(${libname} ${type} ${sources_${libname}})
- set_target_compile_flags(${libname} ${extra_cflags_${libname}})
- set_target_link_flags(${libname} ${extra_link_flags_${libname}})
- set_property(TARGET ${libname} APPEND PROPERTY
- COMPILE_DEFINITIONS ${LIB_DEFS})
- set_target_output_directories(${libname} ${output_dir_${libname}})
- install(TARGETS ${libname}
- ARCHIVE DESTINATION ${install_dir_${libname}}
- ${COMPONENT_OPTION}
- LIBRARY DESTINATION ${install_dir_${libname}}
- ${COMPONENT_OPTION}
- RUNTIME DESTINATION ${install_dir_${libname}}
- ${COMPONENT_OPTION})
- endif()
+ add_library(${libname} ${type} ${sources_${libname}})
+ set_target_compile_flags(${libname} ${extra_cflags_${libname}})
+ set_target_link_flags(${libname} ${extra_link_flags_${libname}})
+ set_property(TARGET ${libname} APPEND PROPERTY
+ COMPILE_DEFINITIONS ${LIB_DEFS})
+ set_target_output_directories(${libname} ${output_dir_${libname}})
set_target_properties(${libname} PROPERTIES
OUTPUT_NAME ${output_name_${libname}})
set_target_properties(${libname} PROPERTIES FOLDER "Compiler-RT Runtime")
@@ -324,6 +299,13 @@ function(add_compiler_rt_runtime name ty
)
endif()
endif()
+ install(TARGETS ${libname}
+ ARCHIVE DESTINATION ${install_dir_${libname}}
+ ${COMPONENT_OPTION}
+ LIBRARY DESTINATION ${install_dir_${libname}}
+ ${COMPONENT_OPTION}
+ RUNTIME DESTINATION ${install_dir_${libname}}
+ ${COMPONENT_OPTION})
# We only want to generate per-library install targets if you aren't using
# an IDE because the extra targets get cluttered in IDEs.
Modified: compiler-rt/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=359579&r1=359578&r2=359579&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Tue Apr 30 10:32:05 2019
@@ -229,7 +229,6 @@ set(ALL_SANITIZER_COMMON_SUPPORTED_ARCH
${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${S390X})
set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}
${MIPS32} ${MIPS64} ${PPC64} ${S390X})
-set(ALL_CRT_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64})
set(ALL_DFSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64})
set(ALL_FUZZER_SUPPORTED_ARCH ${X86_64} ${ARM64})
@@ -473,7 +472,6 @@ if(APPLE)
SANITIZER_COMMON_SUPPORTED_ARCH)
else()
- filter_available_targets(CRT_SUPPORTED_ARCH ${ALL_CRT_SUPPORTED_ARCH})
# Architectures supported by compiler-rt libraries.
filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH
${ALL_SANITIZER_COMMON_SUPPORTED_ARCH})
@@ -562,12 +560,6 @@ endif()
# TODO: Add builtins support.
-if (CRT_SUPPORTED_ARCH AND OS_NAME MATCHES "Linux")
- set(COMPILER_RT_HAS_CRT TRUE)
-else()
- set(COMPILER_RT_HAS_CRT FALSE)
-endif()
-
if (COMPILER_RT_HAS_SANITIZER_COMMON AND DFSAN_SUPPORTED_ARCH AND
OS_NAME MATCHES "Linux")
set(COMPILER_RT_HAS_DFSAN TRUE)
Modified: compiler-rt/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/CMakeLists.txt?rev=359579&r1=359578&r2=359579&view=diff
==============================================================================
--- compiler-rt/trunk/lib/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/CMakeLists.txt Tue Apr 30 10:32:05 2019
@@ -17,10 +17,6 @@ if(COMPILER_RT_BUILD_BUILTINS)
add_subdirectory(builtins)
endif()
-if(COMPILER_RT_BUILD_CRT)
- add_subdirectory(crt)
-endif()
-
function(compiler_rt_build_runtime runtime)
string(TOUPPER ${runtime} runtime_uppercase)
if(COMPILER_RT_HAS_${runtime_uppercase})
Modified: compiler-rt/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/CMakeLists.txt?rev=359579&r1=359578&r2=359579&view=diff
==============================================================================
--- compiler-rt/trunk/test/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/CMakeLists.txt Tue Apr 30 10:32:05 2019
@@ -73,9 +73,6 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS)
if(COMPILER_RT_BUILD_XRAY)
compiler_rt_test_runtime(xray)
endif()
- if(COMPILER_RT_HAS_CRT)
- add_subdirectory(crt)
- endif()
# ShadowCallStack does not yet provide a runtime with compiler-rt, the tests
# include their own minimal runtime
add_subdirectory(shadowcallstack)
More information about the llvm-commits
mailing list