| 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 # Paths to the JSON files are kind of gross. They're stored in the gypi | 5 # Paths to the JSON files are kind of gross. They're stored in the gypi |
| 6 # relative to //components, since that's the working directory gyp seems | 6 # relative to //components, since that's the working directory gyp seems |
| 7 # to use for all of the components. When we depend on them here, we need | 7 # to use for all of the components. When we depend on them here, we need |
| 8 # to remove the leading domain_reliability, since *our* working directory | 8 # to remove the leading domain_reliability, since *our* working directory |
| 9 # is one level deeper. When we call bake_in_configs.py, we need to give | 9 # is one level deeper. When we call bake_in_configs.py, we need to give |
| 10 # it a properly-rebased path to //components so it can properly join the | 10 # it a properly-rebased path to //components so it can properly join the |
| 11 # paths relative to that and find the JSON files. | 11 # paths relative to that and find the JSON files. |
| 12 | 12 |
| 13 baked_in_configs_gypi = exec_script("//build/gypi_to_gn.py", | 13 baked_in_configs_gypi = exec_script("//build/gypi_to_gn.py", |
| 14 [ rebase_path("baked_in_configs.gypi") ], | 14 [ rebase_path("baked_in_configs.gypi") ], |
| 15 "scope", | 15 "scope", |
| 16 [ "baked_in_configs.gypi" ]) | 16 [ "baked_in_configs.gypi" ]) |
| 17 | 17 |
| 18 # The config file names in the .gypi are relative to "//components". | 18 # The config file names in the .gypi are relative to "//components". |
| 19 baked_in_configs = | 19 baked_in_configs = |
| 20 rebase_path(baked_in_configs_gypi.baked_in_configs, ".", "//components") | 20 rebase_path(baked_in_configs_gypi.baked_in_configs, ".", "//components") |
| 21 | 21 |
| 22 action("bake_in_configs") { | 22 action("bake_in_configs") { |
| 23 visibility = [ ":*" ] | 23 visibility = [ ":*" ] |
| 24 script = "bake_in_configs.py" | 24 script = "bake_in_configs.py" |
| 25 | 25 |
| 26 inputs = baked_in_configs | 26 inputs = baked_in_configs + [ "baked_in_configs.gypi" ] |
| 27 output_file = "$target_gen_dir/baked_in_configs.cc" | 27 output_file = "$target_gen_dir/baked_in_configs.cc" |
| 28 outputs = [ | 28 outputs = [ |
| 29 output_file, | 29 output_file, |
| 30 ] | 30 ] |
| 31 | 31 |
| 32 # The JSON file list is too long for the command line on Windows, so put | 32 # The JSON file list is too long for the command line on Windows, so put |
| 33 # them in a response file. | 33 # them in a response file. |
| 34 response_file_contents = rebase_path(inputs, root_build_dir) | 34 response_file_contents = rebase_path(baked_in_configs, root_build_dir) |
| 35 args = [ | 35 args = [ |
| 36 "--file-list", | 36 "--file-list", |
| 37 "{{response_file_name}}", | 37 "{{response_file_name}}", |
| 38 "--output", | 38 "--output", |
| 39 rebase_path(output_file, root_build_dir), | 39 rebase_path(output_file, root_build_dir), |
| 40 ] | 40 ] |
| 41 } | 41 } |
| 42 | 42 |
| 43 component("domain_reliability") { | 43 component("domain_reliability") { |
| 44 sources = [ | 44 sources = [ |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 106 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 107 | 107 |
| 108 deps = [ | 108 deps = [ |
| 109 ":domain_reliability", | 109 ":domain_reliability", |
| 110 "//base", | 110 "//base", |
| 111 "//base/test:test_support", | 111 "//base/test:test_support", |
| 112 "//net:test_support", | 112 "//net:test_support", |
| 113 "//testing/gtest", | 113 "//testing/gtest", |
| 114 ] | 114 ] |
| 115 } | 115 } |
| OLD | NEW |