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