summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-06-15 13:46:59 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-06-17 14:41:41 +0200
commitc8643e47b0ba8dc0f345c2feaabfa60e54f809c3 (patch)
tree580b465c8a577f57df64cfe221df506f64967568
parent566a4df270911e1656efef5dbb16e4f95bf6ca8d (diff)
Fix clang-cl builds
Pick-to: 6.2 Change-Id: I57d3c057e076445f902da509655728cb20a4a18b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/core/CMakeLists.txt13
2 files changed, 12 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5e3d3613..16223007f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -88,6 +88,8 @@ if(NOT Gn_FOUND)
PREFIX gn
USES_TERMINAL_BUILD ON
CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release
+ -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+ -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DCMAKE_PREFIX_PATH:PATH=<INSTALL_DIR>
-DWEBENGINE_ROOT_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR}
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index ab5143e21..349e5c23d 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -270,7 +270,7 @@ foreach(config ${configs})
if(${config} STREQUAL "Debug")
list(APPEND gnArgArg is_debug=true symbol_level=2)
- if(WIN32 AND NOT CLANG)
+ if(WIN32)
list(APPEND gnArgArg enable_iterator_debugging=true v8_optimized_debug=false)
endif()
elseif(${config} STREQUAL "Release")
@@ -338,9 +338,16 @@ foreach(config ${configs})
ARGS is_clang
CONDITION CLANG
)
- if(CLANG)
- list(APPEND gnArgArg clang_use_chrome_plugins=false)
+ if(CLANG AND NOT MACOS)
+ # For some reason this doesn't work for our macOS CIs
+ get_filename_component(clangBasePath ${CMAKE_CXX_COMPILER} DIRECTORY)
+ get_filename_component(clangBasePath ${clangBasePath} DIRECTORY)
+ list(APPEND gnArgArg
+ clang_base_path="${clangBasePath}"
+ clang_use_chrome_plugins=false
+ )
endif()
+
extend_gn_list(gnArgArg
ARGS use_gold
CONDITION QT_FEATURE_use_gold_linker