diff options
author | Michal Klocek <michal.klocek@qt.io> | 2016-12-07 17:37:23 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-12-03 17:28:02 +0100 |
commit | cc2be6e8fc96cf0036b6091b82123f94c7eaa343 (patch) | |
tree | e4364ea7127d1da0c746757b0018df6d55a275d3 /chromium/build | |
parent | 7140b4676a38256ab76b0f6d7629fa418eb15d3f (diff) | |
download | qtwebengine-chromium-cc2be6e8fc96cf0036b6091b82123f94c7eaa343.tar.gz |
Qt GN integration
- Exclude source files we override in the qt webengine sources.
- Add TOOLKIT_QT define for use_qt
- Add is_shared GN argument
Change-Id: I79925220265602bd0c39e5e03162cf1dca15befe
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/build')
-rw-r--r-- | chromium/build/config/BUILD.gn | 4 | ||||
-rw-r--r-- | chromium/build/config/BUILDCONFIG.gn | 5 | ||||
-rw-r--r-- | chromium/build/config/compiler/BUILD.gn | 9 | ||||
-rw-r--r-- | chromium/build/config/features.gni | 2 | ||||
-rw-r--r-- | chromium/build/config/linux/gtk/gtk.gni | 2 | ||||
-rw-r--r-- | chromium/build/config/linux/pangocairo/pangocairo.gni | 4 | ||||
-rw-r--r-- | chromium/build/config/ui.gni | 4 | ||||
-rw-r--r-- | chromium/build/config/win/BUILD.gn | 2 |
8 files changed, 27 insertions, 5 deletions
diff --git a/chromium/build/config/BUILD.gn b/chromium/build/config/BUILD.gn index 95e23e50e2b..f88c691a867 100644 --- a/chromium/build/config/BUILD.gn +++ b/chromium/build/config/BUILD.gn @@ -108,6 +108,10 @@ config("feature_flags") { defines += [ "GOOGLE_CHROME_BUILD" ] } + if (use_qt) { + defines += [ "TOOLKIT_QT" ] + } + # ============================================== # PLEASE DO NOT ADD MORE THINGS TO THIS LIST # ============================================== diff --git a/chromium/build/config/BUILDCONFIG.gn b/chromium/build/config/BUILDCONFIG.gn index 3082046a91d..3815dd6f941 100644 --- a/chromium/build/config/BUILDCONFIG.gn +++ b/chromium/build/config/BUILDCONFIG.gn @@ -165,6 +165,11 @@ declare_args() { is_component_build = is_debug && current_os != "ios" } +declare_args() { + # Shared library build + is_shared = is_component_build +} + assert(!(is_debug && is_official_build), "Can't do official debug builds") # ============================================================================== diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn index 088d14102ec..0ddb7d68ad4 100644 --- a/chromium/build/config/compiler/BUILD.gn +++ b/chromium/build/config/compiler/BUILD.gn @@ -20,6 +20,9 @@ import("//build/toolchain/goma.gni") import("//build/toolchain/toolchain.gni") import("//build_overrides/build.gni") +# Import features.gni for the "use_qt" argument to be available. +import("//build/config/features.gni") + if (current_cpu == "arm" || current_cpu == "arm64") { import("//build/config/arm.gni") } @@ -305,6 +308,12 @@ config("compiler") { } else { } + if (use_qt && is_clang) { + cflags += [ + "-Wno-unknown-warning-option" + ] + } + if (is_clang && is_debug) { # Allow comparing the address of references and 'this' against 0 # in debug builds. Technically, these can never be null in diff --git a/chromium/build/config/features.gni b/chromium/build/config/features.gni index 30359bf9cbf..95c766fd39d 100644 --- a/chromium/build/config/features.gni +++ b/chromium/build/config/features.gni @@ -31,6 +31,8 @@ declare_args() { use_dbus = (is_linux || is_chromeos) && !is_chromecast use_gio = is_linux && !is_chromeos && !is_chromecast + + use_qt = false } # # ============================================= diff --git a/chromium/build/config/linux/gtk/gtk.gni b/chromium/build/config/linux/gtk/gtk.gni index 0a3f35db964..0537064e918 100644 --- a/chromium/build/config/linux/gtk/gtk.gni +++ b/chromium/build/config/linux/gtk/gtk.gni @@ -6,7 +6,7 @@ import("//build/config/ui.gni") declare_args() { # Whether or not we should use libgtk. - use_gtk = is_desktop_linux && !is_chromecast + use_gtk = use_glib && !is_chromecast && !use_qt # The (major) version of GTK to build against. gtk_version = 3 diff --git a/chromium/build/config/linux/pangocairo/pangocairo.gni b/chromium/build/config/linux/pangocairo/pangocairo.gni index 395a1c01ab2..a83549a1a33 100644 --- a/chromium/build/config/linux/pangocairo/pangocairo.gni +++ b/chromium/build/config/linux/pangocairo/pangocairo.gni @@ -3,9 +3,9 @@ # found in the LICENSE file. import("//build/config/chromeos/ui_mode.gni") -import("//build/config/ui.gni") +import("//build/config/linux/gtk/gtk.gni") declare_args() { use_pangocairo = - is_linux && !is_chromeos && !is_chromecast && !chromeos_is_browser_only + use_gtk && !chromeos_is_browser_only } diff --git a/chromium/build/config/ui.gni b/chromium/build/config/ui.gni index 90a237d86c1..6097e7383da 100644 --- a/chromium/build/config/ui.gni +++ b/chromium/build/config/ui.gni @@ -19,6 +19,7 @@ import("//build/config/chromecast_build.gni") import("//build/config/chromeos/ui_mode.gni") +import("//build/config/features.gni") declare_args() { # Indicates if Ozone is enabled. Ozone is a low-level library layer for Linux @@ -49,12 +50,13 @@ declare_args() { assert(!use_glib || (is_linux && !is_chromeos && !is_chromecast)) # Whether to use atk, the Accessibility ToolKit library -use_atk = is_desktop_linux && !is_chromecast && use_glib +use_atk = is_desktop_linux && !is_chromecast && use_glib && !use_qt # Whether using Xvfb to provide a display server for a test might be # necessary. use_xvfb_in_this_config = (is_linux && !is_chromeos) || chromeos_is_browser_only # + # ============================================= # PLEASE DO NOT ADD MORE FLAGS TO THIS FILE # ============================================= diff --git a/chromium/build/config/win/BUILD.gn b/chromium/build/config/win/BUILD.gn index a7a56c94c87..4e6e022a4fd 100644 --- a/chromium/build/config/win/BUILD.gn +++ b/chromium/build/config/win/BUILD.gn @@ -453,7 +453,7 @@ config("delayloads_not_for_child_dll") { # See https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx for a reference of # what each value does. config("default_crt") { - if (is_component_build) { + if (is_shared) { # Component mode: dynamic CRT. Since the library is shared, it requires # exceptions or will give errors about things not matching, so keep # exceptions on. |