Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: build/config/android/rules.gni

Issue 1093643002: Fix gn jni generation rules for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 package_output_dir = "${base_output_dir}/${jni_package}" 42 package_output_dir = "${base_output_dir}/${jni_package}"
43 jni_output_dir = "${package_output_dir}/jni" 43 jni_output_dir = "${package_output_dir}/jni"
44 44
45 jni_generator_include = "//base/android/jni_generator/jni_generator_helper.h" 45 jni_generator_include = "//base/android/jni_generator/jni_generator_helper.h"
46 46
47 foreach_target_name = "${target_name}__jni_gen" 47 foreach_target_name = "${target_name}__jni_gen"
48 action_foreach(foreach_target_name) { 48 action_foreach(foreach_target_name) {
49 script = "//base/android/jni_generator/jni_generator.py" 49 script = "//base/android/jni_generator/jni_generator.py"
50 depfile = "$target_gen_dir/$target_name.{{source_name_part}}.d" 50 depfile = "$target_gen_dir/$target_name.{{source_name_part}}.d"
51 sources = invoker.sources 51 sources = invoker.sources
52 inputs = [
53 jni_generator_include,
54 ]
55 outputs = [ 52 outputs = [
56 depfile, 53 depfile,
57 "${jni_output_dir}/{{source_name_part}}_jni.h", 54 "${jni_output_dir}/{{source_name_part}}_jni.h",
58 ] 55 ]
59 56
60 args = [ 57 args = [
61 "--depfile", 58 "--depfile",
62 rebase_path(depfile, root_build_dir), 59 rebase_path(depfile, root_build_dir),
63 "--input_file={{source}}", 60 "--input_file={{source}}",
64 "--optimize_generation=1", 61 "--optimize_generation=1",
65 "--ptr_type=long", 62 "--ptr_type=long",
66 "--output_dir", 63 "--output_dir",
67 rebase_path(jni_output_dir, root_build_dir), 64 rebase_path(jni_output_dir, root_build_dir),
68 "--includes", 65 "--includes",
69 rebase_path(jni_generator_include, "//"), 66 rebase_path(jni_generator_include, jni_output_dir),
70 "--native_exports_optional", 67 "--native_exports_optional",
71 ] 68 ]
72 if (defined(invoker.jni_generator_jarjar_file)) { 69 if (defined(invoker.jni_generator_jarjar_file)) {
73 args += [ 70 args += [
74 "--jarjar", 71 "--jarjar",
75 rebase_path(jni_generator_jarjar_file, root_build_dir), 72 rebase_path(jni_generator_jarjar_file, root_build_dir),
76 ] 73 ]
77 } 74 }
78 } 75 }
79 76
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 classname = _classname_list[0] 156 classname = _classname_list[0]
160 jni_target_name = "${target_name}__jni_${classname}" 157 jni_target_name = "${target_name}__jni_${classname}"
161 jni_actions += [ ":$jni_target_name" ] 158 jni_actions += [ ":$jni_target_name" ]
162 action(jni_target_name) { 159 action(jni_target_name) {
163 # The sources aren't compiled so don't check their dependencies. 160 # The sources aren't compiled so don't check their dependencies.
164 check_includes = false 161 check_includes = false
165 depfile = "$target_gen_dir/$target_name.d" 162 depfile = "$target_gen_dir/$target_name.d"
166 script = "//base/android/jni_generator/jni_generator.py" 163 script = "//base/android/jni_generator/jni_generator.py"
167 sources = [ 164 sources = [
168 jar_file, 165 jar_file,
169 jni_generator_include,
170 ] 166 ]
171 outputs = [ 167 outputs = [
172 depfile, 168 depfile,
173 "${jni_output_dir}/${classname}_jni.h", 169 "${jni_output_dir}/${classname}_jni.h",
174 ] 170 ]
175 171
176 args = [ 172 args = [
177 "--depfile", 173 "--depfile",
178 rebase_path(depfile, root_build_dir), 174 rebase_path(depfile, root_build_dir),
179 "--jar_file", 175 "--jar_file",
180 rebase_path(jar_file, root_build_dir), 176 rebase_path(jar_file, root_build_dir),
181 "--input_file", 177 "--input_file",
182 class, 178 class,
183 "--optimize_generation=1", 179 "--optimize_generation=1",
184 "--ptr_type=long", 180 "--ptr_type=long",
185 "--output_dir", 181 "--output_dir",
186 rebase_path(jni_output_dir, root_build_dir), 182 rebase_path(jni_output_dir, root_build_dir),
187 "--includes", 183 "--includes",
188 rebase_path(jni_generator_include, root_build_dir), 184 rebase_path(jni_generator_include, jni_output_dir),
189 "--native_exports_optional", 185 "--native_exports_optional",
190 ] 186 ]
191 } 187 }
192 } 188 }
193 189
194 config("jni_includes_${target_name}") { 190 config("jni_includes_${target_name}") {
195 include_dirs = [ base_output_dir ] 191 include_dirs = [ base_output_dir ]
196 } 192 }
197 193
198 group(target_name) { 194 group(target_name) {
(...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 template("uiautomator_test") { 1794 template("uiautomator_test") {
1799 set_sources_assignment_filter([]) 1795 set_sources_assignment_filter([])
1800 if (defined(invoker.testonly)) { 1796 if (defined(invoker.testonly)) {
1801 testonly = invoker.testonly 1797 testonly = invoker.testonly
1802 } 1798 }
1803 assert(target_name != "") 1799 assert(target_name != "")
1804 assert(invoker.deps != [] || true) 1800 assert(invoker.deps != [] || true)
1805 group(target_name) { 1801 group(target_name) {
1806 } 1802 }
1807 } 1803 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698