diff options
author | Allan Jensen <allan.jensen@qt.io> | 2019-03-29 17:27:19 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-05-02 11:05:19 +0000 |
commit | 46ac6474ea4f5592863dbcb295e53080b2e56086 (patch) | |
tree | 0249e7398446360633cc7a80d0230a402c6823eb /src/core/config | |
parent | b546cea1b5ba6721bf7fcb687c6c069d4442ba34 (diff) |
Support clang_cl builds on Windows
Change-Id: I1f3e8fc378cfceda92ff17fcc7669c0f5d97c3f7
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/config')
-rw-r--r-- | src/core/config/linux.pri | 3 | ||||
-rw-r--r-- | src/core/config/windows.pri | 20 |
2 files changed, 18 insertions, 5 deletions
diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri index 3eb436910..95b7a4bda 100644 --- a/src/core/config/linux.pri +++ b/src/core/config/linux.pri @@ -36,8 +36,7 @@ clang { gn_args += \ is_clang=true \ clang_use_chrome_plugins=false \ - clang_base_path=\"$${clang_prefix}\" \ - use_lld=false + clang_base_path=\"$${clang_prefix}\" linux-clang-libc++: gn_args += use_libcxx=true } else { diff --git a/src/core/config/windows.pri b/src/core/config/windows.pri index 9eb15830d..b934ea475 100644 --- a/src/core/config/windows.pri +++ b/src/core/config/windows.pri @@ -1,7 +1,6 @@ include(common.pri) gn_args += \ - is_clang=false \ use_sysroot=false \ enable_session_service=false \ ninja_use_custom_environment_files=false \ @@ -9,6 +8,22 @@ gn_args += \ win_linker_timing=true \ com_init_check_hook_disabled=true +use_lld_linker: gn_args += use_lld=true +else: gn_args += use_lld=false + +clang_cl { + clang_full_path = $$system_path($$which($${QMAKE_CXX})) + # Remove the "\bin\clang-cl.exe" part: + clang_dir = $$dirname(clang_full_path) + clang_prefix = $$join(clang_dir,,,"\..") + gn_args += \ + is_clang=true \ + clang_use_chrome_plugins=false \ + clang_base_path=$$system_quote($$system_path($$clean_path($$clang_prefix))) +} else { + gn_args += is_clang=false +} + isDeveloperBuild() { gn_args += \ is_win_fastlink=true @@ -69,7 +84,6 @@ msvc { GN_TARGET_CPU = $$gnArch($$QT_ARCH) gn_args += target_cpu=\"$$GN_TARGET_CPU\" - } else { - error("Qt WebEngine for Windows can only be built with the Microsoft Visual Studio C++ compiler") + error("Qt WebEngine for Windows can only be built with a Microsoft Visual Studio C++ compatible compiler") } |