aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn4
-rw-r--r--gn/BUILD.gn18
-rw-r--r--gn/BUILDCONFIG.gn10
3 files changed, 23 insertions, 9 deletions
diff --git a/BUILD.gn b/BUILD.gn
index f14a027af5..05fe3500ff 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -85,6 +85,10 @@ config("skia_private") {
"SK_GAMMA_CONTRAST=0.0",
]
}
+ if (is_official_build || is_android) {
+ # TODO(bsalomon): it'd be nice to make Android normal.
+ defines += [ "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0" ]
+ }
}
# Any code that's linked into Skia-the-library should use this config via += skia_library_configs.
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index fd2d0074c6..75f8352e93 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -28,6 +28,16 @@ config("no_rtti") {
}
}
+config("debug_symbols") {
+ # It's annoying to wait for full debug symbols to push over
+ # to Android devices. -gline-tables-only is a lot slimmer.
+ if (is_android) {
+ cflags = [ "-gline-tables-only" ]
+ } else {
+ cflags = [ "-g" ]
+ }
+}
+
config("default") {
cflags = [
"-O1",
@@ -56,14 +66,6 @@ config("default") {
]
ldflags = []
- # It's annoying to wait for full debug symbols to push over
- # to Android devices. -gline-tables-only is a lot slimmer.
- if (is_android) {
- cflags += [ "-gline-tables-only" ]
- } else {
- cflags += [ "-g" ]
- }
-
if (current_cpu == "arm") {
cflags += [
"-march=armv7-a",
diff --git a/gn/BUILDCONFIG.gn b/gn/BUILDCONFIG.gn
index e6a8b695ff..79d06f400b 100644
--- a/gn/BUILDCONFIG.gn
+++ b/gn/BUILDCONFIG.gn
@@ -6,12 +6,17 @@
# It's best to keep the names and defaults of is_foo flags consistent with Chrome.
declare_args() {
- is_debug = true
+ is_official_build = false
is_component_build = false
ndk = ""
ndk_api = 0 # 0 == picked automatically for target_cpu.
sanitize = ""
}
+declare_args() {
+ is_debug = !is_official_build
+}
+
+assert(!(is_debug && is_official_build))
# Platform detection
if (target_os == "") {
@@ -115,6 +120,9 @@ default_configs = [
if (!is_debug) {
default_configs += [ "//gn:release" ]
}
+if (!is_official_build) {
+ default_configs += [ "//gn:debug_symbols" ]
+}
set_defaults("executable") {
configs = default_configs + [ "//gn:executable" ]