@@ -10,6 +10,7 @@ load("@builtin//path.star", "path")
1010load ("@builtin//struct.star" , "module" )
1111load ("./config.star" , "config" )
1212load ("./gn_logs.star" , "gn_logs" )
13+ load ("./platform.star" , "platform" )
1314
1415# TODO: crbug.com/323091468 - Propagate target android ABI and
1516# android SDK version from GN, and remove the hardcoded filegroups.
@@ -60,20 +61,22 @@ def __step_config(ctx, step_config):
6061 # See also https://chromium.googlesource.com/chromium/src/build/+/HEAD/android/docs/java_toolchain.md
6162 {
6263 "name" : "android/write_build_config" ,
63- "command_prefix" : "python3 ../../build/android/gyp/write_build_config.py" ,
64+ "command_prefix" : platform . python_bin + " ../../build/android/gyp/write_build_config.py" ,
6465 "handler" : "android_write_build_config" ,
6566 "remote" : remote_run ,
6667 "timeout" : "2m" ,
68+ "remote_command" : platform .remote_python_bin ,
6769 },
6870 {
6971 "name" : "android/ijar" ,
70- "command_prefix" : "python3 ../../build/android/gyp/ijar.py" ,
72+ "command_prefix" : platform . python_bin + " ../../build/android/gyp/ijar.py" ,
7173 "remote" : remote_run ,
7274 "timeout" : "2m" ,
75+ "remote_command" : platform .remote_python_bin ,
7376 },
7477 {
7578 "name" : "android/turbine" ,
76- "command_prefix" : "python3 ../../build/android/gyp/turbine.py" ,
79+ "command_prefix" : platform . python_bin + " ../../build/android/gyp/turbine.py" ,
7780 "handler" : "android_turbine" ,
7881 # TODO: crbug.com/396220357 - fix gn to remove unnecessary deps
7982 "exclude_input_patterns" : [
@@ -97,10 +100,11 @@ def __step_config(ctx, step_config):
97100 "remote" : remote_run and not config .get (ctx , "no-remote-javac" ),
98101 "platform_ref" : "large" ,
99102 "timeout" : "2m" ,
103+ "remote_command" : platform .remote_python_bin ,
100104 },
101105 {
102106 "name" : "android/compile_resources" ,
103- "command_prefix" : "python3 ../../build/android/gyp/compile_resources.py" ,
107+ "command_prefix" : platform . python_bin + " ../../build/android/gyp/compile_resources.py" ,
104108 "handler" : "android_compile_resources" ,
105109 "exclude_input_patterns" : [
106110 "*.a" ,
@@ -114,10 +118,11 @@ def __step_config(ctx, step_config):
114118 ],
115119 "remote" : remote_run ,
116120 "timeout" : "5m" ,
121+ "remote_command" : platform .remote_python_bin ,
117122 },
118123 {
119124 "name" : "android/compile_java" ,
120- "command_prefix" : "python3 ../../build/android/gyp/compile_java.py" ,
125+ "command_prefix" : platform . python_bin + " ../../build/android/gyp/compile_java.py" ,
121126 "handler" : "android_compile_java" ,
122127 "exclude_input_patterns" : [
123128 "*.a" ,
@@ -137,10 +142,11 @@ def __step_config(ctx, step_config):
137142 "remote" : remote_run and not config .get (ctx , "no-remote-javac" ),
138143 "platform_ref" : "large" ,
139144 "timeout" : "2m" ,
145+ "remote_command" : platform .remote_python_bin ,
140146 },
141147 {
142148 "name" : "android/errorprone" ,
143- "command_prefix" : "python3 ../../build/android/gyp/errorprone.py" ,
149+ "command_prefix" : platform . python_bin + " ../../build/android/gyp/errorprone.py" ,
144150 "handler" : "android_compile_java" ,
145151 "exclude_input_patterns" : [
146152 "*.a" ,
@@ -157,10 +163,11 @@ def __step_config(ctx, step_config):
157163 # obj/chrome/android/chrome_java__errorprone.stamp step takes too
158164 # long.
159165 "timeout" : "6m" ,
166+ "remote_command" : platform .remote_python_bin ,
160167 },
161168 {
162169 "name" : "android/compile_kt" ,
163- "command_prefix" : "python3 ../../build/android/gyp/compile_kt.py" ,
170+ "command_prefix" : platform . python_bin + " ../../build/android/gyp/compile_kt.py" ,
164171 "handler" : "android_compile_java" ,
165172 "exclude_input_patterns" : [
166173 "*.a" ,
@@ -180,10 +187,11 @@ def __step_config(ctx, step_config):
180187 "remote" : remote_run ,
181188 "platform_ref" : "large" ,
182189 "timeout" : "2m" ,
190+ "remote_command" : platform .remote_python_bin ,
183191 },
184192 {
185193 "name" : "android/dex" ,
186- "command_prefix" : "python3 ../../build/android/gyp/dex.py" ,
194+ "command_prefix" : platform . python_bin + " ../../build/android/gyp/dex.py" ,
187195 "handler" : "android_dex" ,
188196 "exclude_input_patterns" : [
189197 "*.a" ,
@@ -202,16 +210,18 @@ def __step_config(ctx, step_config):
202210 "remote" : remote_run ,
203211 "platform_ref" : "large" ,
204212 "timeout" : "2m" ,
213+ "remote_command" : platform .remote_python_bin ,
205214 },
206215 {
207216 "name" : "android/filter_zip" ,
208- "command_prefix" : "python3 ../../build/android/gyp/filter_zip.py" ,
217+ "command_prefix" : platform . python_bin + " ../../build/android/gyp/filter_zip.py" ,
209218 "remote" : remote_run ,
210219 "timeout" : "2m" ,
220+ "remote_command" : platform .remote_python_bin ,
211221 },
212222 {
213223 "name" : "android/generate_resource_allowlist" ,
214- "command_prefix" : "python3 ../../tools/resources/generate_resource_allowlist.py" ,
224+ "command_prefix" : platform . python_bin + " ../../tools/resources/generate_resource_allowlist.py" ,
215225 "indirect_inputs" : {
216226 "includes" : ["*.o" , "*.a" ],
217227 },
@@ -221,15 +231,16 @@ def __step_config(ctx, step_config):
221231 },
222232 {
223233 "name" : "android/trace_event_bytecode_rewriter" ,
224- "command_prefix" : "python3 ../../build/android/gyp/trace_event_bytecode_rewriter.py" ,
234+ "command_prefix" : platform . python_bin + " ../../build/android/gyp/trace_event_bytecode_rewriter.py" ,
225235 "handler" : "android_trace_event_bytecode_rewriter" ,
226236 "remote" : remote_run ,
227237 "platform_ref" : "large" ,
228238 "timeout" : "10m" ,
239+ "remote_command" : platform .remote_python_bin ,
229240 },
230241 {
231242 "name" : "android/proguard/local" ,
232- "command_prefix" : "python3 ../../build/android/gyp/proguard.py" ,
243+ "command_prefix" : platform . python_bin + " ../../build/android/gyp/proguard.py" ,
233244 "action_outs" : [
234245 # http://crbug.com/396004680#comment15: It slows down CQ build.
235246 # It's better to run it locally.
@@ -239,7 +250,7 @@ def __step_config(ctx, step_config):
239250 },
240251 {
241252 "name" : "android/proguard" ,
242- "command_prefix" : "python3 ../../build/android/gyp/proguard.py" ,
253+ "command_prefix" : platform . python_bin + " ../../build/android/gyp/proguard.py" ,
243254 "handler" : "android_proguard" ,
244255 "exclude_input_patterns" : [
245256 "*.a" ,
@@ -254,10 +265,11 @@ def __step_config(ctx, step_config):
254265 "remote" : remote_run ,
255266 "platform_ref" : "large" ,
256267 "timeout" : "10m" ,
268+ "remote_command" : platform .remote_python_bin ,
257269 },
258270 {
259271 "name" : "android/trace_references" ,
260- "command_prefix" : "python3 ../../build/android/gyp/tracereferences.py" ,
272+ "command_prefix" : platform . python_bin + " ../../build/android/gyp/tracereferences.py" ,
261273 "handler" : "android_trace_references" ,
262274 "exclude_input_patterns" : [
263275 "*.a" ,
@@ -272,10 +284,11 @@ def __step_config(ctx, step_config):
272284 "remote" : remote_run_static_analysis ,
273285 "platform_ref" : "large" ,
274286 "timeout" : "10m" ,
287+ "remote_command" : platform .remote_python_bin ,
275288 },
276289 {
277290 "name" : "android/apkbuilder" ,
278- "command_prefix" : "python3 ../../build/android/gyp/apkbuilder.py" ,
291+ "command_prefix" : platform . python_bin + " ../../build/android/gyp/apkbuilder.py" ,
279292 "handler" : "android_apkbuilder" ,
280293 "remote" : config .get (ctx , "remote-link" ) or config .get (ctx , "default-remote" ) or config .get (ctx , "builder" ),
281294 "platform_ref" : "large" ,
@@ -285,10 +298,11 @@ def __step_config(ctx, step_config):
285298 "*.proto" ,
286299 "*.o" ,
287300 ],
301+ "remote_command" : platform .remote_python_bin ,
288302 },
289303 {
290304 "name" : "android/create_size_info_files" ,
291- "command_prefix" : "python3 ../../build/android/gyp/create_size_info_files.py" ,
305+ "command_prefix" : platform . python_bin + " ../../build/android/gyp/create_size_info_files.py" ,
292306 "handler" : "android_create_size_info_files" ,
293307 "remote" : remote_run ,
294308 "platform_ref" : "large" ,
@@ -300,6 +314,7 @@ def __step_config(ctx, step_config):
300314 "*.inc" ,
301315 "*.cpp" ,
302316 ],
317+ "remote_command" : platform .remote_python_bin ,
303318 },
304319 ])
305320 return step_config
0 commit comments