Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
6.5 kB · 129 lines
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130diff --git a/CMakeLists.txt b/CMakeLists.txtindex b44ad2c2118e..d42f5664d448 100644--- a/CMakeLists.txt+++ b/CMakeLists.txt@@ -8,6 +8,7 @@ cmake_minimum_required(VERSION 3.13.4) # Check if compiler-rt is built as a standalone project. if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD) project(CompilerRT C CXX ASM)+ include(GNUInstallDirs) set(COMPILER_RT_STANDALONE_BUILD TRUE) set_property(GLOBAL PROPERTY USE_FOLDERS ON) endif()diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmakeindex 361538a58e47..f0d8d9ab80f1 100644--- a/cmake/Modules/AddCompilerRT.cmake+++ b/cmake/Modules/AddCompilerRT.cmake@@ -495,7 +495,7 @@ macro(add_compiler_rt_resource_file target_name file_name component) add_custom_target(${target_name} DEPENDS ${dst_file}) # Install in Clang resource directory. install(FILES ${file_name}- DESTINATION ${COMPILER_RT_INSTALL_PATH}/share+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR} COMPONENT ${component}) add_dependencies(${component} ${target_name}) @@ -512,7 +512,7 @@ macro(add_compiler_rt_script name) add_custom_target(${name} DEPENDS ${dst}) install(FILES ${dst} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE- DESTINATION ${COMPILER_RT_INSTALL_PATH}/bin)+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_BINDIR}) endmacro(add_compiler_rt_script src name) # Builds custom version of libc++ and installs it in <prefix>.diff --git a/cmake/Modules/CompilerRTDarwinUtils.cmake b/cmake/Modules/CompilerRTDarwinUtils.cmakeindex 456a8dcda59f..7a09e74c7c79 100644--- a/cmake/Modules/CompilerRTDarwinUtils.cmake+++ b/cmake/Modules/CompilerRTDarwinUtils.cmake@@ -508,7 +508,7 @@ macro(darwin_add_embedded_builtin_libraries) set(DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR ${COMPILER_RT_OUTPUT_DIR}/lib/macho_embedded) set(DARWIN_macho_embedded_LIBRARY_INSTALL_DIR- ${COMPILER_RT_INSTALL_PATH}/lib/macho_embedded)+ ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/macho_embedded) set(CFLAGS_armv7 "-target thumbv7-apple-darwin-eabi") set(CFLAGS_i386 "-march=pentium")diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmakeindex f61d487e93a0..f1f46fb9599c 100644--- a/cmake/Modules/CompilerRTUtils.cmake+++ b/cmake/Modules/CompilerRTUtils.cmake@@ -378,7 +378,7 @@ endfunction() function(get_compiler_rt_install_dir arch install_dir) if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) get_compiler_rt_target(${arch} target)- set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/lib/${target} PARENT_SCOPE)+ set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/${target} PARENT_SCOPE) else() set(${install_dir} ${COMPILER_RT_LIBRARY_INSTALL_DIR} PARENT_SCOPE) endif()diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmakeindex 1edab43e7c0d..1aac6b73ff82 100644--- a/cmake/base-config-ix.cmake+++ b/cmake/base-config-ix.cmake@@ -65,11 +65,11 @@ if (LLVM_TREE_AVAILABLE) else() # Take output dir and install path from the user. set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH- "Path where built compiler-rt libraries should be stored.")+ "Path where built compiler-rt build artifacts should be stored.") set(COMPILER_RT_EXEC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin CACHE PATH "Path where built compiler-rt executables should be stored.")- set(COMPILER_RT_INSTALL_PATH ${CMAKE_INSTALL_PREFIX} CACHE PATH- "Path where built compiler-rt libraries should be installed.")+ set(COMPILER_RT_INSTALL_PATH "" CACHE PATH+ "Prefix where built compiler-rt artifacts should be installed, comes before CMAKE_INSTALL_PREFIX.") option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests." OFF) option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered" OFF) # Use a host compiler to compile/link tests.@@ -97,7 +97,7 @@ else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR) set(COMPILER_RT_LIBRARY_OUTPUT_DIR ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR}) set(COMPILER_RT_LIBRARY_INSTALL_DIR- ${COMPILER_RT_INSTALL_PATH}/lib/${COMPILER_RT_OS_DIR})+ ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/${COMPILER_RT_OS_DIR}) endif() if(APPLE)diff --git a/include/CMakeLists.txt b/include/CMakeLists.txtindex b00e8caa1ddd..0fe64e4862c9 100644--- a/include/CMakeLists.txt+++ b/include/CMakeLists.txt@@ -69,22 +69,22 @@ set_target_properties(compiler-rt-headers PROPERTIES FOLDER "Compiler-RT Misc") install(FILES ${SANITIZER_HEADERS} COMPONENT compiler-rt-headers PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ- DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/sanitizer)+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/sanitizer) # Install fuzzer headers. install(FILES ${FUZZER_HEADERS} COMPONENT compiler-rt-headers PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ- DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/fuzzer)+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/fuzzer) # Install xray headers. install(FILES ${XRAY_HEADERS} COMPONENT compiler-rt-headers PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ- DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/xray)+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/xray) # Install profile headers. install(FILES ${PROFILE_HEADERS} COMPONENT compiler-rt-headers PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ- DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/profile)+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/profile) if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDEs. add_custom_target(install-compiler-rt-headersdiff --git a/lib/dfsan/CMakeLists.txt b/lib/dfsan/CMakeLists.txtindex a29de8deff1b..d39ff01613d2 100644--- a/lib/dfsan/CMakeLists.txt+++ b/lib/dfsan/CMakeLists.txt@@ -57,4 +57,4 @@ add_custom_command(OUTPUT ${dfsan_abilist_filename} DEPENDS done_abilist.txt libc_ubuntu1404_abilist.txt) add_dependencies(dfsan dfsan_abilist) install(FILES ${dfsan_abilist_filename}- DESTINATION ${COMPILER_RT_INSTALL_PATH}/share)+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR})