Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

101 rader
3.6 KiB

  1. diff -rupN llvm-3.4.src/CMakeLists.txt llvm-3.4.src.cotire/CMakeLists.txt
  2. --- llvm-3.4.src/CMakeLists.txt 2013-11-25 19:34:26.000000000 +0100
  3. +++ llvm-3.4.src.cotire/CMakeLists.txt 2014-01-06 20:25:12.000000000 +0100
  4. @@ -1,7 +1,7 @@
  5. # See docs/CMake.html for instructions about how to build LLVM with CMake.
  6. project(LLVM)
  7. -cmake_minimum_required(VERSION 2.8)
  8. +cmake_minimum_required(VERSION 2.8.12)
  9. # Add path for custom modules
  10. set(CMAKE_MODULE_PATH
  11. @@ -25,6 +25,8 @@ if ( LLVM_USE_FOLDERS )
  12. endif()
  13. include(VersionFromVCS)
  14. +include(cotire)
  15. +set_property(DIRECTORY PROPERTY COTIRE_UNITY_LINK_LIBRARIES_INIT "COPY_UNITY")
  16. option(LLVM_APPEND_VC_REV
  17. "Append the version control system revision id to LLVM version" OFF)
  18. diff -rupN llvm-3.4.src/cmake/modules/AddLLVM.cmake llvm-3.4.src.cotire/cmake/modules/AddLLVM.cmake
  19. --- llvm-3.4.src/cmake/modules/AddLLVM.cmake 2013-08-27 21:25:01.000000000 +0200
  20. +++ llvm-3.4.src.cotire/cmake/modules/AddLLVM.cmake 2014-01-06 20:25:50.000000000 +0100
  21. @@ -41,6 +41,10 @@ macro(add_llvm_library name)
  22. # property has been set to an empty value.
  23. get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${name})
  24. target_link_libraries(${name} ${lib_deps})
  25. +if (COMMAND cotire)
  26. + set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
  27. + cotire(${name})
  28. +endif()
  29. endmacro(add_llvm_library name)
  30. macro(add_llvm_loadable_module name)
  31. @@ -78,6 +82,10 @@ ${name} ignored.")
  32. ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
  33. endif()
  34. endif()
  35. +if (COMMAND cotire)
  36. + set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
  37. + cotire(${name})
  38. +endif()
  39. endif()
  40. set_target_properties(${name} PROPERTIES FOLDER "Loadable modules")
  41. @@ -119,6 +127,10 @@ macro(add_llvm_tool name)
  42. endif()
  43. endif()
  44. set_target_properties(${name} PROPERTIES FOLDER "Tools")
  45. +if (COMMAND cotire)
  46. + set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
  47. + cotire(${name})
  48. +endif()
  49. endmacro(add_llvm_tool name)
  50. @@ -132,12 +144,20 @@ macro(add_llvm_example name)
  51. install(TARGETS ${name} RUNTIME DESTINATION examples)
  52. endif()
  53. set_target_properties(${name} PROPERTIES FOLDER "Examples")
  54. +if (COMMAND cotire)
  55. + set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
  56. + cotire(${name})
  57. +endif()
  58. endmacro(add_llvm_example name)
  59. macro(add_llvm_utility name)
  60. add_llvm_executable(${name} ${ARGN})
  61. set_target_properties(${name} PROPERTIES FOLDER "Utils")
  62. +if (COMMAND cotire)
  63. + set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
  64. + cotire(${name})
  65. +endif()
  66. endmacro(add_llvm_utility name)
  67. @@ -245,6 +265,10 @@ function(add_unittest test_suite test_na
  68. set(target_compile_flags "${target_compile_flags} -Wno-variadic-macros")
  69. endif ()
  70. set_property(TARGET ${test_name} PROPERTY COMPILE_FLAGS "${target_compile_flags}")
  71. +if (COMMAND cotire)
  72. + set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
  73. + cotire(${name})
  74. +endif()
  75. endfunction()
  76. # This function provides an automatic way to 'configure'-like generate a file
  77. diff -rupN llvm-3.4.src/lib/Support/CMakeLists.txt llvm-3.4.src.cotire/lib/Support/CMakeLists.txt
  78. --- llvm-3.4.src/lib/Support/CMakeLists.txt 2013-09-04 18:00:12.000000000 +0200
  79. +++ llvm-3.4.src.cotire/lib/Support/CMakeLists.txt 2014-01-06 20:27:36.000000000 +0100
  80. @@ -1,3 +1,7 @@
  81. +if (COMMAND cotire)
  82. + set_source_files_properties (IsInf.cpp IsNAN.cpp PROPERTIES COTIRE_EXCLUDED TRUE)
  83. +endif()
  84. +
  85. add_llvm_library(LLVMSupport
  86. APFloat.cpp
  87. APInt.cpp