| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 # Generates a header with preprocessor defines specified by the build file. | 5 # Generates a header with preprocessor defines specified by the build file. |
| 6 # The GYP version of this (with instructions) is build/buildflag_header.gypi. | 6 # The GYP version of this (with instructions) is build/buildflag_header.gypi. |
| 7 # | 7 # |
| 8 # The flags are converted to function-style defines with mangled names and | 8 # The flags are converted to function-style defines with mangled names and |
| 9 # code uses an accessor macro to access the values. This is to try to | 9 # code uses an accessor macro to access the values. This is to try to |
| 10 # minimize bugs where code checks whether something is defined or not, and | 10 # minimize bugs where code checks whether something is defined or not, and |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 if (defined(invoker.flags)) { | 115 if (defined(invoker.flags)) { |
| 116 response_file_contents += invoker.flags | 116 response_file_contents += invoker.flags |
| 117 } | 117 } |
| 118 | 118 |
| 119 args = [ | 119 args = [ |
| 120 "--output", | 120 "--output", |
| 121 header_file, # Not rebased, Python script puts it inside gen-dir. | 121 header_file, # Not rebased, Python script puts it inside gen-dir. |
| 122 "--rulename", | 122 "--rulename", |
| 123 get_label_info(":$target_name", "label_no_toolchain"), | 123 get_label_info(":$target_name", "label_no_toolchain"), |
| 124 "--gen-dir", | 124 "--gen-dir", |
| 125 rebase_path(root_gen_dir, root_out_dir), | 125 rebase_path(root_gen_dir, root_build_dir), |
| 126 "--definitions", | 126 "--definitions", |
| 127 "{{response_file_name}}", | 127 "{{response_file_name}}", |
| 128 ] | 128 ] |
| 129 | 129 |
| 130 forward_variables_from(invoker, | 130 forward_variables_from(invoker, |
| 131 [ | 131 [ |
| 132 "deps", | 132 "deps", |
| 133 "public_deps", | 133 "public_deps", |
| 134 "testonly", | 134 "testonly", |
| 135 "visibility", | 135 "visibility", |
| 136 ]) | 136 ]) |
| 137 } | 137 } |
| 138 } | 138 } |
| OLD | NEW |