1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//testing/test.gni")
7 defines = [ "GN_BUILD" ]
9 static_library("gn_lib") {
10 configs += [ "//build/config:precompiled_headers" ]
13 "action_target_generator.cc",
14 "action_target_generator.h",
19 "binary_target_generator.cc",
20 "binary_target_generator.h",
27 "c_include_iterator.cc",
28 "c_include_iterator.h",
45 "config_values_extractors.cc",
46 "config_values_extractors.h",
47 "config_values_generator.cc",
48 "config_values_generator.h",
49 "copy_target_generator.cc",
50 "copy_target_generator.h",
59 "filesystem_utils.cc",
61 "function_exec_script.cc",
62 "function_foreach.cc",
63 "function_forward_variables_from.cc",
64 "function_get_label_info.cc",
65 "function_get_path_info.cc",
66 "function_get_target_outputs.cc",
67 "function_process_file_template.cc",
68 "function_read_file.cc",
69 "function_rebase_path.cc",
70 "function_set_default_toolchain.cc",
71 "function_set_defaults.cc",
72 "function_template.cc",
73 "function_toolchain.cc",
74 "function_write_file.cc",
77 "functions_target.cc",
78 "group_target_generator.cc",
79 "group_target_generator.h",
84 "inherited_libraries.cc",
85 "inherited_libraries.h",
86 "input_conversion.cc",
90 "input_file_manager.cc",
91 "input_file_manager.h",
103 "ninja_action_target_writer.cc",
104 "ninja_action_target_writer.h",
105 "ninja_binary_target_writer.cc",
106 "ninja_binary_target_writer.h",
107 "ninja_build_writer.cc",
108 "ninja_build_writer.h",
109 "ninja_copy_target_writer.cc",
110 "ninja_copy_target_writer.h",
111 "ninja_group_target_writer.cc",
112 "ninja_group_target_writer.h",
113 "ninja_target_writer.cc",
114 "ninja_target_writer.h",
115 "ninja_toolchain_writer.cc",
116 "ninja_toolchain_writer.h",
139 "scope_per_file_provider.cc",
140 "scope_per_file_provider.h",
149 "source_file_type.cc",
150 "source_file_type.h",
155 "substitution_list.cc",
156 "substitution_list.h",
157 "substitution_pattern.cc",
158 "substitution_pattern.h",
159 "substitution_type.cc",
160 "substitution_type.h",
161 "substitution_writer.cc",
162 "substitution_writer.h",
167 "target_generator.cc",
168 "target_generator.h",
184 "value_extractors.cc",
185 "value_extractors.h",
194 "//base/third_party/dynamic_annotations",
198 action("last_commit_position") {
199 script = "last_commit_position.py"
201 # This dependency forces a re-run when the code is synced.
203 "//build/util/LASTCHANGE",
206 outfile = "$target_gen_dir/last_commit_position.h"
212 rebase_path("//", root_build_dir),
213 rebase_path(outfile, root_build_dir),
214 "TOOLS_GN_LAST_COMMIT_POSITION_H_",
218 # Note for Windows debugging: GN is super-multithreaded and uses a lot of STL.
219 # Iterator debugging on Windows does locking for every access, which ends up
220 # slowing down debug runtime from 0:36 to 9:40. If you want to run debug builds
221 # of GN over the large Chrome build, you will want to set the arg:
222 # enable_iterator_debugging = false
230 ":last_commit_position",
235 # TODO(GYP): Delete this after we've converted everything to GN.
236 # The _run targets exist only for compatibility w/ GYP.
237 group("gn_unittests_run") {
244 test("gn_unittests") {
246 "action_target_generator_unittest.cc",
248 "builder_unittest.cc",
249 "c_include_iterator_unittest.cc",
250 "command_format_unittest.cc",
251 "config_values_extractors_unittest.cc",
252 "escape_unittest.cc",
253 "exec_process_unittest.cc",
254 "filesystem_utils_unittest.cc",
255 "function_foreach_unittest.cc",
256 "function_forward_variables_from_unittest.cc",
257 "function_get_label_info_unittest.cc",
258 "function_get_path_info_unittest.cc",
259 "function_get_target_outputs_unittest.cc",
260 "function_process_file_template_unittest.cc",
261 "function_rebase_path_unittest.cc",
262 "function_write_file_unittest.cc",
263 "functions_target_unittest.cc",
264 "functions_unittest.cc",
265 "header_checker_unittest.cc",
266 "inherited_libraries_unittest.cc",
267 "input_conversion_unittest.cc",
268 "label_pattern_unittest.cc",
270 "loader_unittest.cc",
271 "ninja_action_target_writer_unittest.cc",
272 "ninja_binary_target_writer_unittest.cc",
273 "ninja_copy_target_writer_unittest.cc",
274 "ninja_group_target_writer_unittest.cc",
275 "ninja_target_writer_unittest.cc",
276 "ninja_toolchain_writer_unittest.cc",
277 "operators_unittest.cc",
278 "parse_tree_unittest.cc",
279 "parser_unittest.cc",
280 "path_output_unittest.cc",
281 "pattern_unittest.cc",
282 "runtime_deps_unittest.cc",
283 "scope_per_file_provider_unittest.cc",
285 "source_dir_unittest.cc",
286 "source_file_unittest.cc",
287 "string_utils_unittest.cc",
288 "substitution_pattern_unittest.cc",
289 "substitution_writer_unittest.cc",
290 "target_generator_unittest.cc",
291 "target_unittest.cc",
292 "template_unittest.cc",
293 "test_with_scope.cc",
295 "tokenizer_unittest.cc",
296 "unique_vector_unittest.cc",
298 "visibility_unittest.cc",
307 "//base/test:run_all_unittests",
308 "//base/test:test_support",
313 executable("generate_test_gn_data") {
315 "generate_test_gn_data.cc",