From 64a2e6ff1cb9c169f251ee5983c27156b27a0470 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 5 Apr 2019 15:08:41 +0200 Subject: Enable precompiled headers for qtwebengine core Chromium requires us to add a special config to enable precompiled headers. Note this still depends additionally on that the corresponding GN flag is also set. Changes in 3rdparty: 9401dc18ce02 Add precompiled object files to qmake link output 8ba90427ae5e Improve the issue with long file names on windows Change-Id: I6680232e17a5254d3ca53e5a40e6a15a6b7fc82d Reviewed-by: Michal Klocek --- mkspecs/features/gn_generator.prf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mkspecs/features') diff --git a/mkspecs/features/gn_generator.prf b/mkspecs/features/gn_generator.prf index e6ae263ac..4b8462415 100644 --- a/mkspecs/features/gn_generator.prf +++ b/mkspecs/features/gn_generator.prf @@ -177,7 +177,8 @@ GN_CONTENTS += "$${TARGET_TYPE}(\"$$TARGET\") {" for (imp, GN_IMPORTS): GN_CONTENTS += " import(\"$$imp\")" } -GN_CONTENTS += " configs += [ \":$${TARGET}_config\" ] " +GN_CONTENTS += " configs += [ \":$${TARGET}_config\" ]" +GN_CONTENTS += " configs += [ \"//build/config:precompiled_headers\" ]" # Source files to compile GN_CONTENTS += " sources = [" -- cgit v1.2.3 From 87570b4e360ab62ef5791d5c23ddd36aaa07ba05 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 5 Apr 2019 15:29:37 +0200 Subject: Make .moc files jumbo built Split the moc generated sources to a separate source_set, and make it jumbo. Change-Id: Icdbe9e7fb57cc07d89b766ef9e8efc78ff67bc8b Reviewed-by: Michal Klocek --- mkspecs/features/gn_generator.prf | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) (limited to 'mkspecs/features') diff --git a/mkspecs/features/gn_generator.prf b/mkspecs/features/gn_generator.prf index 4b8462415..4efbd92f2 100644 --- a/mkspecs/features/gn_generator.prf +++ b/mkspecs/features/gn_generator.prf @@ -26,6 +26,8 @@ isEmpty(GN_FILE): GN_FILE = $$system_path($$_PRO_FILE_PWD_/BUILD.gn) isEmpty(GN_RUN_BINARY_SCRIPT): GN_RUN_BINARY_SCRIPT = "//build/gn_run_binary.py" isEmpty(GN_FIND_MOCABLES_SCRIPT): GN_FIND_MOCABLES_SCRIPT = "//build/gn_find_mocables.py" +GN_CONTENTS += "import(\"//build/config/jumbo.gni\")" + # MOC SETUP GN_CONTENTS += "moc_source_h_files = exec_script(\"$$GN_FIND_MOCABLES_SCRIPT\"," @@ -169,6 +171,26 @@ GN_CONTENTS += "}" # TARGET SETUP +GN_CONTENTS += "jumbo_source_set(\"$${TARGET}_MOC\") {" +GN_CONTENTS += " configs += [ \":$${TARGET}_config\" ]" +GN_CONTENTS += " configs += [ \"//build/config:precompiled_headers\" ]" +GN_CONTENTS += " sources = []" +GN_CONTENTS += " deps = []" +GN_CONTENTS += " if (moc_source_h_files != []) {" +GN_CONTENTS += " deps += [" +GN_CONTENTS += " \":generate_h_mocs\"," +GN_CONTENTS += " ]" +# Add moc output files to compile +GN_CONTENTS += " sources += get_target_outputs(\":generate_h_mocs\")" +GN_CONTENTS += " }" +GN_CONTENTS += " if (moc_source_cpp_files != []) {" +GN_CONTENTS += " deps += [" +GN_CONTENTS += " \":generate_cpp_mocs\"," +GN_CONTENTS += " ]" +GN_CONTENTS += " }" +GN_CONTENTS += "}" + + TARGET_TYPE = $$getTargetType() GN_CONTENTS += "$${TARGET_TYPE}(\"$$TARGET\") {" @@ -221,18 +243,7 @@ win32 { CONFIG(rtti): GN_CONTENTS += " configs += [\"//build/config/compiler:rtti\"]" } -GN_CONTENTS += " if (moc_source_h_files != []) {" -GN_CONTENTS += " deps += [" -GN_CONTENTS += " \":generate_h_mocs\"," -GN_CONTENTS += " ]" -# Add moc output files to compile -GN_CONTENTS += " sources += get_target_outputs(\":generate_h_mocs\")" -GN_CONTENTS += " }" -GN_CONTENTS += " if (moc_source_cpp_files != []) {" -GN_CONTENTS += " deps += [" -GN_CONTENTS += " \":generate_cpp_mocs\"," -GN_CONTENTS += " ]" -GN_CONTENTS += " }" +GN_CONTENTS += " deps += [ \":$${TARGET}_MOC\" ]" GN_CONTENTS += "}" GN_CONTENTS += "" GN_CONTENTS += "if (!defined(core_include_dirs)) {"\ -- cgit v1.2.3 From 26ac59af2306b4f6f83e791bb3e828b9f7b1a721 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 29 Apr 2019 16:27:07 +0200 Subject: Skip qtwebengine for -no-gui build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: QTBUG-75465 Change-Id: Iaf8c75d60d00dac3079fcb3f7108e1c3e5ea5245 Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Michael BrĂ¼ning --- mkspecs/features/configure.prf | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mkspecs/features') diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf index d7d382a4f..42e5b40c9 100644 --- a/mkspecs/features/configure.prf +++ b/mkspecs/features/configure.prf @@ -4,6 +4,10 @@ load(functions) load(platform) defineTest(runConfigure) { + !qtHaveModule(gui) { + skipBuild("QtWebEngine requires QtGui.") + return(false) + } !exists(src/3rdparty/chromium) { skipBuild("Submodule qtwebengine-chromium does not exist. Run 'git submodule update --init'.") -- cgit v1.2.3 From 46ac6474ea4f5592863dbcb295e53080b2e56086 Mon Sep 17 00:00:00 2001 From: Allan Jensen Date: Fri, 29 Mar 2019 17:27:19 +0100 Subject: Support clang_cl builds on Windows Change-Id: I1f3e8fc378cfceda92ff17fcc7669c0f5d97c3f7 Reviewed-by: Michal Klocek --- mkspecs/features/gn_generator.prf | 7 ++++++- mkspecs/features/platform.prf | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'mkspecs/features') diff --git a/mkspecs/features/gn_generator.prf b/mkspecs/features/gn_generator.prf index 4efbd92f2..78b56d123 100644 --- a/mkspecs/features/gn_generator.prf +++ b/mkspecs/features/gn_generator.prf @@ -120,13 +120,18 @@ GN_CONTENTS += "config(\"$${TARGET}_config\") {" } # Stop the barrage of unused variables warnings. -gcc|clang { +gcc|clang|clang_cl { QMAKE_CXXFLAGS += "-Wno-unused-parameter" QMAKE_CXXFLAGS += "-Wno-unused-variable" } else:msvc { QMAKE_CXXFLAGS += /wd4100 /wd4101 } +# Chromium activates this, but we need it off to be able to compile QFlags +clang_cl { + QMAKE_CXXFLAGS += "-fno-complete-member-pointers" +} + !isEmpty(QMAKE_CXXFLAGS) { GN_CONTENTS += " cflags_cc = [" for(flag, QMAKE_CXXFLAGS): GN_CONTENTS += " \"$$filter_flag_values($$flag)\"," diff --git a/mkspecs/features/platform.prf b/mkspecs/features/platform.prf index 35eb6b89c..67be73f74 100644 --- a/mkspecs/features/platform.prf +++ b/mkspecs/features/platform.prf @@ -26,7 +26,7 @@ defineTest(isPlatformSupported) { skipBuild("Qt WebEngine on Windows must be built on a 64-bit machine.") } !msvc|intel_icl { - skipBuild("Qt WebEngine on Windows requires MSVC.") + skipBuild("Qt WebEngine on Windows requires MSVC or Clang (MSVC mode).") return(false) } !isMinWinSDKVersion(10, 16299): { -- cgit v1.2.3