kepka/cotire/Patches/llvm-3.5.src.patch

100 lines
3.7 KiB
Diff

diff -rupN --exclude=.DS_Store --exclude='*.pyc' llvm-3.5.0.src/CMakeLists.txt llvm-3.5.0.src.cotire/CMakeLists.txt
--- llvm-3.5.0.src/CMakeLists.txt 2014-07-04 06:23:26.000000000 +0200
+++ llvm-3.5.0.src.cotire/CMakeLists.txt 2014-12-14 12:19:41.000000000 +0100
@@ -1,6 +1,6 @@
# See docs/CMake.html for instructions about how to build LLVM with CMake.
-cmake_minimum_required(VERSION 2.8.8)
+cmake_minimum_required(VERSION 2.8.12)
# FIXME: It may be removed when we use 2.8.12.
if(CMAKE_VERSION VERSION_LESS 2.8.12)
@@ -41,6 +41,8 @@ if ( LLVM_USE_FOLDERS )
endif()
include(VersionFromVCS)
+include(cotire)
+set_property(DIRECTORY PROPERTY COTIRE_UNITY_LINK_LIBRARIES_INIT "COPY_UNITY")
option(LLVM_APPEND_VC_REV
"Append the version control system revision id to LLVM version" OFF)
diff -rupN --exclude=.DS_Store --exclude='*.pyc' llvm-3.5.0.src/cmake/modules/AddLLVM.cmake llvm-3.5.0.src.cotire/cmake/modules/AddLLVM.cmake
--- llvm-3.5.0.src/cmake/modules/AddLLVM.cmake 2014-07-23 17:19:01.000000000 +0200
+++ llvm-3.5.0.src.cotire/cmake/modules/AddLLVM.cmake 2014-12-14 12:28:35.000000000 +0100
@@ -106,6 +106,10 @@ function(add_llvm_symbol_exports target_
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " /DEF:${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
endif()
+if (COMMAND cotire)
+ set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
+ cotire(${name})
+endif()
endif()
add_custom_target(${target_name}_exports DEPENDS ${native_export_file})
@@ -394,6 +398,10 @@ macro(add_llvm_library name)
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
endif()
set_target_properties(${name} PROPERTIES FOLDER "Libraries")
+if (COMMAND cotire)
+ set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
+ cotire(${name})
+endif()
endmacro(add_llvm_library name)
macro(add_llvm_loadable_module name)
@@ -422,6 +430,10 @@ macro(add_llvm_loadable_module name)
endif()
set_target_properties(${name} PROPERTIES FOLDER "Loadable modules")
+if (COMMAND cotire)
+ set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
+ cotire(${name})
+endif()
endmacro(add_llvm_loadable_module name)
@@ -471,6 +483,10 @@ macro(add_llvm_tool name)
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
endif()
set_target_properties(${name} PROPERTIES FOLDER "Tools")
+if (COMMAND cotire)
+ set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
+ cotire(${name})
+endif()
endmacro(add_llvm_tool name)
@@ -483,12 +499,20 @@ macro(add_llvm_example name)
install(TARGETS ${name} RUNTIME DESTINATION examples)
endif()
set_target_properties(${name} PROPERTIES FOLDER "Examples")
+if (COMMAND cotire)
+ set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
+ cotire(${name})
+endif()
endmacro(add_llvm_example name)
macro(add_llvm_utility name)
add_llvm_executable(${name} ${ARGN})
set_target_properties(${name} PROPERTIES FOLDER "Utils")
+if (COMMAND cotire)
+ set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
+ cotire(${name})
+endif()
endmacro(add_llvm_utility name)
diff -rupN --exclude=.DS_Store --exclude='*.pyc' llvm-3.5.0.src/lib/Support/CMakeLists.txt llvm-3.5.0.src.cotire/lib/Support/CMakeLists.txt
--- llvm-3.5.0.src/lib/Support/CMakeLists.txt 2014-07-17 22:05:29.000000000 +0200
+++ llvm-3.5.0.src.cotire/lib/Support/CMakeLists.txt 2014-12-14 12:17:10.000000000 +0100
@@ -1,3 +1,7 @@
+if (COMMAND cotire)
+ set_source_files_properties (IsInf.cpp IsNAN.cpp PROPERTIES COTIRE_EXCLUDED TRUE)
+endif()
+
add_llvm_library(LLVMSupport
APFloat.cpp
APInt.cpp