amdvlk: allow CMAKE_BUILD_TYPE=None
This commit is contained in:
parent
77979bd9c1
commit
ea31e833a6
1 changed files with 60 additions and 0 deletions
60
srcpkgs/amdvlk/patches/cmake-build-type-none.patch
Normal file
60
srcpkgs/amdvlk/patches/cmake-build-type-none.patch
Normal file
|
@ -0,0 +1,60 @@
|
|||
Index: llvm-project/llvm/CMakeLists.txt
|
||||
===================================================================
|
||||
--- llvm-project/llvm/CMakeLists.txt.orig
|
||||
+++ llvm-project/llvm/CMakeLists.txt
|
||||
@@ -251,11 +251,6 @@ endif()
|
||||
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
||||
|
||||
-if (CMAKE_BUILD_TYPE AND
|
||||
- NOT uppercase_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
|
||||
- message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
|
||||
-endif()
|
||||
-
|
||||
set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
|
||||
|
||||
set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')")
|
||||
Index: pal/cmake/Modules/AmdCmakeHelper.cmake
|
||||
===================================================================
|
||||
--- pal/cmake/Modules/AmdCmakeHelper.cmake.orig
|
||||
+++ pal/cmake/Modules/AmdCmakeHelper.cmake
|
||||
@@ -37,11 +37,6 @@ if (CMAKE_CONFIGURATION_TYPES)
|
||||
else()
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" capital_CMAKE_BUILD_TYPE)
|
||||
|
||||
- if (CMAKE_BUILD_TYPE AND
|
||||
- NOT capital_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
|
||||
- message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
|
||||
- endif()
|
||||
-
|
||||
if(capital_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
|
||||
set(CMAKE_BUILD_TYPE_DEBUG ON)
|
||||
set(CMAKE_BUILD_TYPE_RELEASE OFF)
|
||||
Index: xgl/CMakeLists.txt
|
||||
===================================================================
|
||||
--- xgl/CMakeLists.txt.orig
|
||||
+++ xgl/CMakeLists.txt
|
||||
@@ -181,11 +181,6 @@ if (CMAKE_CONFIGURATION_TYPES)
|
||||
else()
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" capital_CMAKE_BUILD_TYPE)
|
||||
|
||||
- if (CMAKE_BUILD_TYPE AND
|
||||
- NOT capital_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
|
||||
- message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
|
||||
- endif()
|
||||
-
|
||||
if(capital_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
|
||||
set(CMAKE_BUILD_TYPE_DEBUG ON)
|
||||
set(CMAKE_BUILD_TYPE_RELEASE OFF)
|
||||
Index: xgl/icd/CMakeLists.txt
|
||||
===================================================================
|
||||
--- xgl/icd/CMakeLists.txt.orig
|
||||
+++ xgl/icd/CMakeLists.txt
|
||||
@@ -84,7 +84,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Cl
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE_RELEASE)
|
||||
- target_compile_options(xgl PRIVATE -O3)
|
||||
if(XGL_ENABLE_LTO)
|
||||
if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
|
Loading…
Reference in a new issue