Add support for use_blink gn variable to conditionally compile blink.
Blink (and the relevant support code, content, components) was conditionally compiled based on is_ios. Clean this up so it is compiled based on a top level GN variable. Bug: 1411704 Change-Id: Ib7dbb1f6d4edf4acf40ce77875a811762ec8cd26 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4207057 Reviewed-by: Rohit Rao <rohitrao@chromium.org> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Commit-Queue: Dave Tapuska <dtapuska@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Dirk Pranke <dpranke@google.com> Cr-Commit-Position: refs/heads/main@{#1100099}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
9ad0f7e70e
commit
70065a6a8a
build
chrome/common
content
ios/build
third_party
@ -7,6 +7,7 @@ import("//build/config/chrome_build.gni")
|
||||
import("//build/config/chromecast_build.gni")
|
||||
import("//build/config/chromeos/args.gni")
|
||||
import("//build/config/chromeos/ui_mode.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/util/process_version.gni")
|
||||
import("//build_overrides/build.gni")
|
||||
|
||||
@ -30,6 +31,11 @@ buildflag_header("branding_buildflags") {
|
||||
}
|
||||
}
|
||||
|
||||
buildflag_header("blink_buildflags") {
|
||||
header = "blink_buildflags.h"
|
||||
flags = [ "USE_BLINK=$use_blink" ]
|
||||
}
|
||||
|
||||
buildflag_header("chromecast_buildflags") {
|
||||
header = "chromecast_buildflags.h"
|
||||
|
||||
|
@ -36,6 +36,8 @@ declare_args() {
|
||||
use_dbus = is_linux || is_chromeos
|
||||
|
||||
use_gio = is_linux && !is_castos
|
||||
|
||||
use_blink = !is_ios
|
||||
}
|
||||
#
|
||||
# =============================================
|
||||
|
@ -23,7 +23,7 @@ import("//printing/buildflags/buildflags.gni")
|
||||
import("//ui/base/ui_features.gni")
|
||||
import("//ui/webui/webui_features.gni")
|
||||
|
||||
assert(!is_ios, "Chromium/iOS shouldn't use anything in //chrome")
|
||||
assert(use_blink, "Chromium without blink shouldn't use anything in //chrome")
|
||||
|
||||
# Please keep features in alphabetical order.
|
||||
declare_args() {
|
||||
|
@ -2,6 +2,7 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//build/config/features.gni")
|
||||
import("//build/config/nacl/config.gni")
|
||||
import("//ppapi/buildflags/buildflags.gni")
|
||||
import("//tools/grit/grit_rule.gni")
|
||||
@ -12,7 +13,7 @@ config("content_implementation") {
|
||||
configs = [ "//build/config/compiler:wexit_time_destructors" ]
|
||||
}
|
||||
|
||||
assert(!is_ios, "Chromium/iOS shouldn't use anything in //content")
|
||||
assert(use_blink, "Chromium without blink shouldn't use anything in //content")
|
||||
|
||||
# When targets depend on, e.g. //content/public/browser, what happens? To
|
||||
# facilitate the complexity here, the "public" targets are groups that forward
|
||||
|
@ -2,6 +2,8 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//build/config/features.gni")
|
||||
|
||||
# Global list of dependencies that are conceptually bad on iOS and should
|
||||
# never be added (they will never be supported).
|
||||
_ios_conceptually_bad_dependencies = [
|
||||
@ -28,5 +30,7 @@ ios_extension_assert_no_deps = [
|
||||
"//url/*",
|
||||
]
|
||||
|
||||
ios_assert_no_deps =
|
||||
_ios_conceptually_bad_dependencies + _ios_transient_bad_dependencies
|
||||
ios_assert_no_deps = _ios_transient_bad_dependencies
|
||||
if (!use_blink) {
|
||||
ios_assert_no_deps += _ios_conceptually_bad_dependencies
|
||||
}
|
||||
|
@ -38,3 +38,4 @@ filter_a = "//ui/base:ui_base_unittests"
|
||||
filter_b = "//ui/gfx:gfx_unittests"
|
||||
filter_c = "//url:url_unittests"
|
||||
filter_d = "//third_party/crashpad/*"
|
||||
filter_e = "//content/shell/*"
|
5
third_party/BUILD.gn
vendored
5
third_party/BUILD.gn
vendored
@ -2,11 +2,14 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//build/config/features.gni")
|
||||
import("//build/config/freetype/freetype.gni")
|
||||
import("//third_party/harfbuzz-ng/harfbuzz.gni")
|
||||
import("//third_party/libjpeg.gni")
|
||||
|
||||
assert(!is_ios, "This is not used on iOS, don't drag it in unintentionally")
|
||||
assert(
|
||||
use_blink,
|
||||
"This is not used on if blink is not enabled, don't drag it in unintentionally")
|
||||
|
||||
config("system_libjpeg_config") {
|
||||
libs = [ "jpeg" ]
|
||||
|
@ -2,7 +2,9 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
assert(!is_ios)
|
||||
import("//build/config/features.gni")
|
||||
|
||||
assert(use_blink)
|
||||
|
||||
import("//build/buildflag_header.gni")
|
||||
import("//build/config/compiler/compiler.gni")
|
||||
|
Reference in New Issue
Block a user