For debug builds, -O0 by default, adding -O1 only on bots.
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4344 Change-Id: Idc1435d75e51ea0b54d369efa91993d369aa74c0 Reviewed-on: https://skia-review.googlesource.com/4344 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
This commit is contained in:
parent
abacf0978f
commit
df707567a0
@ -95,7 +95,6 @@ config("default") {
|
||||
}
|
||||
} else {
|
||||
cflags += [
|
||||
"-O1",
|
||||
"-fstrict-aliasing",
|
||||
"-fPIC",
|
||||
"-fvisibility=hidden",
|
||||
|
@ -48,6 +48,10 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils):
|
||||
|
||||
assert compiler == 'Clang' # At this rate we might not ever support GCC.
|
||||
|
||||
extra_cflags = []
|
||||
if configuration == 'Debug':
|
||||
extra_cflags.append('-O1')
|
||||
|
||||
ndk_asset = 'android_ndk_linux' if os == 'Ubuntu' else 'android_ndk_darwin'
|
||||
|
||||
quote = lambda x: '"%s"' % x
|
||||
@ -63,6 +67,8 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils):
|
||||
args['skia_enable_vulkan_debug_layers'] = 'false'
|
||||
if 'FrameworkDefs' in extra_config:
|
||||
args['skia_enable_android_framework_defines'] = 'true'
|
||||
if extra_cflags:
|
||||
args['extra_cflags'] = repr(extra_cflags).replace("'", '"')
|
||||
|
||||
gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in sorted(args.iteritems()))
|
||||
|
||||
|
@ -57,6 +57,9 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
|
||||
elif compiler == 'GCC':
|
||||
cc, cxx = 'gcc', 'g++'
|
||||
|
||||
if compiler != 'MSVC' and configuration == 'Debug':
|
||||
extra_cflags.append('-O1')
|
||||
|
||||
if extra_config == 'Exceptions':
|
||||
extra_cflags.append('/EHsc')
|
||||
if extra_config == 'Fast':
|
||||
|
@ -90,7 +90,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-mipsel-Debug-GN_Android/Debug",
|
||||
"--args=ndk=\"[SLAVE_BUILD]/android_ndk_darwin\" target_cpu=\"mipsel\""
|
||||
"--args=extra_cflags=[\"-O1\"] ndk=\"[SLAVE_BUILD]/android_ndk_darwin\" target_cpu=\"mipsel\""
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -131,7 +131,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug",
|
||||
"--args=cc=\"clang\" cxx=\"clang++\""
|
||||
"--args=cc=\"clang\" cxx=\"clang++\" extra_cflags=[\"-O1\"]"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -96,7 +96,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Debug-GN_Android-Trybot/Debug",
|
||||
"--args=ndk=\"[SLAVE_BUILD]/android_ndk_linux\" target_cpu=\"arm64\""
|
||||
"--args=extra_cflags=[\"-O1\"] ndk=\"[SLAVE_BUILD]/android_ndk_linux\" target_cpu=\"arm64\""
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -90,7 +90,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Debug-GN_Android_FrameworkDefs/Debug",
|
||||
"--args=ndk=\"[SLAVE_BUILD]/android_ndk_linux\" skia_enable_android_framework_defines=true target_cpu=\"arm64\""
|
||||
"--args=extra_cflags=[\"-O1\"] ndk=\"[SLAVE_BUILD]/android_ndk_linux\" skia_enable_android_framework_defines=true target_cpu=\"arm64\""
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -92,7 +92,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Debug-ASAN/Debug",
|
||||
"--args=cc=\"[SLAVE_BUILD]/clang_linux/bin/clang\" cxx=\"[SLAVE_BUILD]/clang_linux/bin/clang++\" extra_ldflags=[\"-fuse-ld=lld\"] sanitize=\"ASAN\""
|
||||
"--args=cc=\"[SLAVE_BUILD]/clang_linux/bin/clang\" cxx=\"[SLAVE_BUILD]/clang_linux/bin/clang++\" extra_cflags=[\"-O1\"] extra_ldflags=[\"-fuse-ld=lld\"] sanitize=\"ASAN\""
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -92,7 +92,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Debug-GN/Debug",
|
||||
"--args=cc=\"[SLAVE_BUILD]/clang_linux/bin/clang\" cxx=\"[SLAVE_BUILD]/clang_linux/bin/clang++\" extra_ldflags=[\"-fuse-ld=lld\"]"
|
||||
"--args=cc=\"[SLAVE_BUILD]/clang_linux/bin/clang\" cxx=\"[SLAVE_BUILD]/clang_linux/bin/clang++\" extra_cflags=[\"-O1\"] extra_ldflags=[\"-fuse-ld=lld\"]"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -92,7 +92,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86-Debug/Debug",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" target_cpu=\"x86\""
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\"] target_cpu=\"x86\""
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -92,7 +92,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-GN/Debug",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\""
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\"]"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -92,7 +92,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_ldflags=[\"-L[SLAVE_BUILD]/clang_linux/msan\"] sanitize=\"MSAN\" skia_use_fontconfig=false"
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\"] extra_ldflags=[\"-L[SLAVE_BUILD]/clang_linux/msan\"] sanitize=\"MSAN\" skia_use_fontconfig=false"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -92,7 +92,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-NoGPU/Debug",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" skia_enable_gpu=false"
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\"] skia_enable_gpu=false"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -92,7 +92,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE/Debug",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-DSK_USE_DISCARDABLE_SCALEDIMAGECACHE\"]"
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\", \"-DSK_USE_DISCARDABLE_SCALEDIMAGECACHE\"]"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -114,7 +114,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[SLAVE_BUILD]/out/Debug",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\""
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\"]"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -114,7 +114,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[SLAVE_BUILD]/out/Debug",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\""
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\"]"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -120,7 +120,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[SLAVE_BUILD]/out/Debug",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\""
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\"]"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -114,7 +114,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[SLAVE_BUILD]/out/Debug",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\""
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\"]"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -114,7 +114,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[SLAVE_BUILD]/out/Debug",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\""
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\"]"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -114,7 +114,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[SLAVE_BUILD]/out/Debug",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\""
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\"]"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -114,7 +114,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[SLAVE_BUILD]/out/Debug",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\""
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\"]"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -114,7 +114,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[SLAVE_BUILD]/out/Debug",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\""
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\"]"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -114,7 +114,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[SLAVE_BUILD]/out/Debug",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\""
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\"]"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
Loading…
Reference in New Issue
Block a user