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("//base/android/linker/config.gni") | 5 import("//base/android/linker/config.gni") |
6 import("//build/config/android/config.gni") | 6 import("//build/config/android/config.gni") |
7 import("//build/config/android/internal_rules.gni") | 7 import("//build/config/android/internal_rules.gni") |
8 import("//tools/grit/grit_rule.gni") | 8 import("//tools/grit/grit_rule.gni") |
9 import("//tools/relocation_packer/config.gni") | 9 import("//tools/relocation_packer/config.gni") |
10 | 10 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 rebase_path(jni_output_dir, root_build_dir), | 67 rebase_path(jni_output_dir, root_build_dir), |
68 "--includes", | 68 "--includes", |
69 rebase_path(jni_generator_include, "//"), | 69 rebase_path(jni_generator_include, "//"), |
70 ] | 70 ] |
71 if (defined(invoker.jni_generator_jarjar_file)) { | 71 if (defined(invoker.jni_generator_jarjar_file)) { |
72 args += [ | 72 args += [ |
73 "--jarjar", | 73 "--jarjar", |
74 rebase_path(jni_generator_jarjar_file, root_build_dir), | 74 rebase_path(jni_generator_jarjar_file, root_build_dir), |
75 ] | 75 ] |
76 } | 76 } |
77 if (!is_clang) { | |
78 # Clang builds currently fail with --native_exports_optional due to | |
79 # http://llvm.org/bugs/show_bug.cgi?id=22602 - only enable for gcc. | |
80 # http://crbug.com/442327 | |
81 args += [ "--native_exports_optional" ] | |
82 } | |
83 } | 77 } |
84 | 78 |
85 config("jni_includes_${target_name}") { | 79 config("jni_includes_${target_name}") { |
86 # TODO(cjhopman): #includes should probably all be relative to | 80 # TODO(cjhopman): #includes should probably all be relative to |
87 # base_output_dir. Remove that from this config once the includes are | 81 # base_output_dir. Remove that from this config once the includes are |
88 # updated. | 82 # updated. |
89 include_dirs = [ | 83 include_dirs = [ |
90 base_output_dir, | 84 base_output_dir, |
91 package_output_dir, | 85 package_output_dir, |
92 ] | 86 ] |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 rebase_path(jar_file, root_build_dir), | 177 rebase_path(jar_file, root_build_dir), |
184 "--input_file", | 178 "--input_file", |
185 class, | 179 class, |
186 "--optimize_generation=1", | 180 "--optimize_generation=1", |
187 "--ptr_type=long", | 181 "--ptr_type=long", |
188 "--output_dir", | 182 "--output_dir", |
189 rebase_path(jni_output_dir, root_build_dir), | 183 rebase_path(jni_output_dir, root_build_dir), |
190 "--includes", | 184 "--includes", |
191 rebase_path(jni_generator_include, root_build_dir), | 185 rebase_path(jni_generator_include, root_build_dir), |
192 ] | 186 ] |
193 if (!is_clang) { | |
194 # Clang builds currently fail with --native_exports_optional due to | |
195 # http://llvm.org/bugs/show_bug.cgi?id=22602 - only enable for gcc. | |
196 # http://crbug.com/442327 | |
197 args += [ "--native_exports_optional" ] | |
198 } | |
199 } | 187 } |
200 } | 188 } |
201 | 189 |
202 config("jni_includes_${target_name}") { | 190 config("jni_includes_${target_name}") { |
203 include_dirs = [ base_output_dir ] | 191 include_dirs = [ base_output_dir ] |
204 } | 192 } |
205 | 193 |
206 group(target_name) { | 194 group(target_name) { |
207 deps = jni_actions | 195 deps = jni_actions |
208 if (defined(invoker.deps)) { | 196 if (defined(invoker.deps)) { |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 set_sources_assignment_filter([]) | 339 set_sources_assignment_filter([]) |
352 if (defined(invoker.testonly)) { | 340 if (defined(invoker.testonly)) { |
353 testonly = invoker.testonly | 341 testonly = invoker.testonly |
354 } | 342 } |
355 | 343 |
356 assert(defined(invoker.sources)) | 344 assert(defined(invoker.sources)) |
357 assert(defined(invoker.outputs)) | 345 assert(defined(invoker.outputs)) |
358 | 346 |
359 action("${target_name}__generate_enum") { | 347 action("${target_name}__generate_enum") { |
360 # The sources aren't compiled so don't check their dependencies. | 348 # The sources aren't compiled so don't check their dependencies. |
361 check_includes = false | 349 # TODO(brettw) uncomment after GN binary rolled pas 314974 (which added |
| 350 # support for this value on actions). |
| 351 #check_includes = false |
362 | 352 |
363 sources = invoker.sources | 353 sources = invoker.sources |
364 script = "//build/android/gyp/java_cpp_enum.py" | 354 script = "//build/android/gyp/java_cpp_enum.py" |
365 gen_dir = "${target_gen_dir}/${target_name}/enums" | 355 gen_dir = "${target_gen_dir}/${target_name}/enums" |
366 outputs = | 356 outputs = |
367 get_path_info(rebase_path(invoker.outputs, ".", gen_dir), "abspath") | 357 get_path_info(rebase_path(invoker.outputs, ".", gen_dir), "abspath") |
368 | 358 |
369 args = [ | 359 args = [ |
370 "--output_dir", | 360 "--output_dir", |
371 rebase_path(gen_dir, root_build_dir), | 361 rebase_path(gen_dir, root_build_dir), |
(...skipping 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1745 template("uiautomator_test") { | 1735 template("uiautomator_test") { |
1746 set_sources_assignment_filter([]) | 1736 set_sources_assignment_filter([]) |
1747 if (defined(invoker.testonly)) { | 1737 if (defined(invoker.testonly)) { |
1748 testonly = invoker.testonly | 1738 testonly = invoker.testonly |
1749 } | 1739 } |
1750 assert(target_name != "") | 1740 assert(target_name != "") |
1751 assert(invoker.deps != [] || true) | 1741 assert(invoker.deps != [] || true) |
1752 group(target_name) { | 1742 group(target_name) { |
1753 } | 1743 } |
1754 } | 1744 } |
OLD | NEW |