OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/chrome_build.gni") | 5 import("//build/config/chrome_build.gni") |
6 import("//build/config/ui.gni") | 6 import("//build/config/ui.gni") |
7 import("//third_party/WebKit/Source/bindings/bindings.gni") | 7 import("//third_party/WebKit/Source/bindings/bindings.gni") |
8 import("//third_party/WebKit/Source/bindings/core/v8/generated.gni") | 8 import("//third_party/WebKit/Source/bindings/core/v8/generated.gni") |
9 import("//third_party/WebKit/Source/bindings/modules/modules.gni") | 9 import("//third_party/WebKit/Source/bindings/modules/modules.gni") |
10 import("//third_party/WebKit/Source/bindings/modules/v8/generated.gni") | 10 import("//third_party/WebKit/Source/bindings/modules/v8/generated.gni") |
11 import("//third_party/WebKit/Source/bindings/scripts/scripts.gni") | 11 import("//third_party/WebKit/Source/bindings/scripts/scripts.gni") |
12 import("//third_party/WebKit/Source/config.gni") | 12 import("//third_party/WebKit/Source/config.gni") |
13 import("//third_party/WebKit/Source/core/core.gni") | 13 import("//third_party/WebKit/Source/core/core.gni") |
14 import("//third_party/WebKit/Source/build/scripts/scripts.gni") | 14 import("//third_party/WebKit/Source/build/scripts/scripts.gni") |
15 import("//third_party/WebKit/Source/platform/platform_generated.gni") | 15 import("//third_party/WebKit/Source/platform/platform_generated.gni") |
16 | 16 |
17 visibility = [ "//third_party/WebKit/Source/*" ] | 17 visibility = [ "//third_party/WebKit/Source/*" ] |
18 | 18 |
19 rel_blink_core_gen_dir = rebase_path(blink_core_output_dir, root_build_dir) | 19 rel_blink_core_gen_dir = rebase_path(blink_core_output_dir, root_build_dir) |
20 | 20 |
21 # Compute the optimization level. The GYP code sets "optimize: max" which sets | 21 # Compute the optimization level. The GYP code sets "optimize: max" which sets |
22 # speed-over-size optimization for official builds on Windows only. The GN's | 22 # speed-over-size optimization for official builds on Windows only. The GN's |
23 # build optimize_max config applies this optimization on all platforms, so | 23 # build optimize_max config applies this optimization on all platforms, so |
24 # compute how to modify the config list to duplicate the GYP behavior. | 24 # compute how to modify the config list to duplicate the GYP behavior. |
25 if (is_debug) { | 25 if (is_debug || !is_win || !is_official_build) { |
26 core_config_remove = [ "//build/config/compiler:no_optimize" ] | 26 # NOP. |
27 core_config_add = core_config_remove # NOP | 27 core_config_add = [] |
| 28 core_config_remove = [] |
28 } else { | 29 } else { |
29 core_config_remove = [ "//build/config/compiler:optimize" ] | 30 if (using_new_global_compiler_configs) { |
30 | 31 # GN build is moving to a single default optimization config that prevents |
31 if (is_win && is_official_build) { | 32 # us from having to break out the debug/release conditions to override. |
32 core_config_add = [ "//build/config/compiler:optimize_max" ] | 33 core_config_remove = [ "//build/config/compiler:default_optimization" ] |
33 } else { | 34 } else { |
34 core_config_add = core_config_remove # NOP | 35 core_config_remove = [ "//build/config/compiler:optimize" ] |
35 } | 36 } |
| 37 core_config_add = [ "//build/config/compiler:optimize_max" ] |
36 } | 38 } |
37 | 39 |
38 # Core targets also get wexit time destructors. | 40 # Core targets also get wexit time destructors. |
39 core_config_add += [ "//build/config/compiler:wexit_time_destructors" ] | 41 core_config_add += [ "//build/config/compiler:wexit_time_destructors" ] |
40 | 42 |
41 config("core_include_dirs") { | 43 config("core_include_dirs") { |
42 include_dirs = [ | 44 include_dirs = [ |
43 "..", | 45 "..", |
44 "$root_gen_dir/blink", | 46 "$root_gen_dir/blink", |
45 ] | 47 ] |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1038 "$blink_core_output_dir/{{source_name_part}}.h", | 1040 "$blink_core_output_dir/{{source_name_part}}.h", |
1039 ] | 1041 ] |
1040 args = [ | 1042 args = [ |
1041 "{{source}}", | 1043 "{{source}}", |
1042 rel_blink_core_gen_dir, | 1044 rel_blink_core_gen_dir, |
1043 bison_exe, | 1045 bison_exe, |
1044 ] | 1046 ] |
1045 | 1047 |
1046 deps = make_core_generated_deps | 1048 deps = make_core_generated_deps |
1047 } | 1049 } |
OLD | NEW |