Skip to content

Commit b6f357c

Browse files
committed
Add conditional platform flag for Android builds
This change adds a platform flag to the Docker build command when the configuration platform is set to 'android'. By appending '--platform linux/amd64', we ensure that the Docker build for V8 uses the correct platform, aligning with similar logic used elsewhere in the build system. This improvement helps maintain consistency and compatibility across different build environments.
1 parent e307bd9 commit b6f357c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build_system/docker_build.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,10 @@ def target_cpu(value):
9999
image_name = self.get_v8_image_name(config)
100100

101101
no_cache = " --no-cache" if hasattr(config, 'no_docker_cache') and config.no_docker_cache else ""
102+
platform_flag = " --platform linux/amd64" if config.platform == "android" else ""
102103

103104
print ("Building V8 docker image: " + config.inject_env(image_name))
104-
self.exec_v8_cmd("docker build" + no_cache + " " + args_str + " -f Dockerfile -t \"" + image_name + "\" . ", config)
105+
self.exec_v8_cmd("docker build" + no_cache + platform_flag + " " + args_str + " -f Dockerfile -t \"" + image_name + "\" . ", config)
105106

106107
def pre_build(self, config):
107108
print ("preparing " + config.platform + "@" + config.arch + " => " + config.name)

0 commit comments

Comments
 (0)