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") |
| 6 import("//third_party/WebKit/Source/config.gni") |
| 7 |
5 blink_core_output_dir = "$root_gen_dir/blink/core" | 8 blink_core_output_dir = "$root_gen_dir/blink/core" |
6 | 9 |
| 10 # This file sets core_config_add and core_config_remove lists of configs to |
| 11 # modify the default lists of configs set in the build as appropriate for core |
| 12 # targets. This avoids duplicating logic across many targets. |
| 13 core_config_add = [ |
| 14 "//build/config/compiler:wexit_time_destructors", |
| 15 "//third_party/WebKit/Source:config", |
| 16 "//third_party/WebKit/Source:non_test_config", |
| 17 "//third_party/WebKit/Source/core:config", |
| 18 ] |
| 19 core_config_remove = [] |
| 20 |
| 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 |
| 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. |
| 25 # TODO revisit this behavior, as the Windows-specific part seems suspicious. |
| 26 if (is_win && is_official_build) { |
| 27 core_config_remove += [ "//build/config/compiler:default_optimization" ] |
| 28 core_config_add += [ "//build/config/compiler:optimize_max" ] |
| 29 } |
| 30 |
| 31 if (remove_webcore_debug_symbols) { |
| 32 core_config_remove += [ "//build/config/compiler:default_symbols" ] |
| 33 core_config_add += [ "//build/config/compiler:no_symbols" ] |
| 34 } |
| 35 |
7 # This file is the GN version of core.gypi. We rebase most paths to be absolute | 36 # This file is the GN version of core.gypi. We rebase most paths to be absolute |
8 # so these lists can be used by BUILD files in different directories without | 37 # so these lists can be used by BUILD files in different directories without |
9 # worrying about the base directory. | 38 # worrying about the base directory. |
10 _gypi = | 39 _gypi = |
11 exec_script("//build/gypi_to_gn.py", | 40 exec_script("//build/gypi_to_gn.py", |
12 [ | 41 [ |
13 rebase_path("core.gypi"), | 42 rebase_path("core.gypi"), |
14 "--replace=<(SHARED_INTERMEDIATE_DIR)=$root_gen_dir", | 43 "--replace=<(SHARED_INTERMEDIATE_DIR)=$root_gen_dir", |
15 "--replace=<(blink_core_output_dir)=$blink_core_output_dir", | 44 "--replace=<(blink_core_output_dir)=$blink_core_output_dir", |
16 ], | 45 ], |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 "abspath") | 82 "abspath") |
54 webcore_testing_dependency_idl_files = | 83 webcore_testing_dependency_idl_files = |
55 get_path_info(_gypi.webcore_testing_dependency_idl_files, "abspath") | 84 get_path_info(_gypi.webcore_testing_dependency_idl_files, "abspath") |
56 generated_core_dictionary_files = | 85 generated_core_dictionary_files = |
57 get_path_info(_gypi.generated_core_dictionary_files, "abspath") | 86 get_path_info(_gypi.generated_core_dictionary_files, "abspath") |
58 generated_core_testing_dictionary_files = | 87 generated_core_testing_dictionary_files = |
59 get_path_info(_gypi.generated_core_testing_dictionary_files, "abspath") | 88 get_path_info(_gypi.generated_core_testing_dictionary_files, "abspath") |
60 generated_webcore_testing_idl_files = | 89 generated_webcore_testing_idl_files = |
61 get_path_info(_gypi.generated_webcore_testing_idl_files, "abspath") | 90 get_path_info(_gypi.generated_webcore_testing_idl_files, "abspath") |
62 webcore_testing_files = get_path_info(_gypi.webcore_testing_files, "abspath") | 91 webcore_testing_files = get_path_info(_gypi.webcore_testing_files, "abspath") |
OLD | NEW |