summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCole Faust <colefaust@google.com>2024-04-18 11:21:17 -0700
committerCole Faust <colefaust@google.com>2024-04-18 11:31:27 -0700
commit796175fd6e38471d61799622af7a18f5e75ecc54 (patch)
treef7453ff264b3ebdae5bb3b0547457819998d49b8
parent2256ec1ce2dd55955916844fcf37001f467dec69 (diff)
downloadbuild-tools-796175fd6e38471d61799622af7a18f5e75ecc54.tar.gz
Add prebuilts for darwin-arm64 python launchers
When enabling embedded_launcher: true by default for python binaries, some darwin-arm64 builds fail because there's no python launcher for darwin-arm64. However, the x86 prebuilt is actually a fat binary with both architectures: $ file py3-launcher-autorun64 py3-launcher-autorun64: Mach-O universal binary with 2 architectures: [x86_64:\012- Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|WEAK_DEFINES|BINDS_TO_WEAK|PIE>] [\012- arm64] So we can use the x86 launchers on arm as well. Bug: 331488610 Test: Will run abtd on the mac build that failed before Change-Id: I755e4729cef563a644bc6861b906179da06b385b
-rw-r--r--Android.bp28
1 files changed, 18 insertions, 10 deletions
diff --git a/Android.bp b/Android.bp
index 592b0e01..59316869 100644
--- a/Android.bp
+++ b/Android.bp
@@ -175,17 +175,21 @@ cpython3_cc_prebuilt_binary {
stl: "none",
target: {
glibc_x86_64: {
- srcs: ["linux-x86/bin/py3-launcher64"]
+ srcs: ["linux-x86/bin/py3-launcher64"],
},
musl_arm64: {
- srcs: ["linux_musl-arm64/bin/py3-launcher64"]
+ srcs: ["linux_musl-arm64/bin/py3-launcher64"],
},
musl_x86_64: {
- srcs: ["linux_musl-x86/bin/py3-launcher64"]
+ srcs: ["linux_musl-x86/bin/py3-launcher64"],
},
darwin_x86_64: {
srcs: ["darwin-x86/bin/py3-launcher64"],
},
+ darwin_arm64: {
+ // The darwin-x86 folder actually contains universal binaries that have both x86 and arm code
+ srcs: ["darwin-x86/bin/py3-launcher64"],
+ },
},
// Use the prebuilts for most branches
@@ -205,10 +209,10 @@ cpython3_cc_prebuilt_binary {
stl: "none",
target: {
musl_arm64: {
- srcs: ["linux_musl-arm64/bin/py3-launcher-static64"]
+ srcs: ["linux_musl-arm64/bin/py3-launcher-static64"],
},
musl_x86_64: {
- srcs: ["linux_musl-x86/bin/py3-launcher-static64"]
+ srcs: ["linux_musl-x86/bin/py3-launcher-static64"],
},
},
@@ -229,17 +233,21 @@ cpython3_cc_prebuilt_binary {
stl: "none",
target: {
glibc_x86_64: {
- srcs: ["linux-x86/bin/py3-launcher-autorun64"]
+ srcs: ["linux-x86/bin/py3-launcher-autorun64"],
},
musl_arm64: {
- srcs: ["linux_musl-arm64/bin/py3-launcher-autorun64"]
+ srcs: ["linux_musl-arm64/bin/py3-launcher-autorun64"],
},
musl_x86_64: {
- srcs: ["linux_musl-x86/bin/py3-launcher-autorun64"]
+ srcs: ["linux_musl-x86/bin/py3-launcher-autorun64"],
},
darwin_x86_64: {
srcs: ["darwin-x86/bin/py3-launcher-autorun64"],
},
+ darwin_arm64: {
+ // The darwin-x86 folder actually contains universal binaries that have both x86 and arm code
+ srcs: ["darwin-x86/bin/py3-launcher-autorun64"],
+ },
},
// Use the prebuilts for most branches
@@ -259,10 +267,10 @@ cpython3_cc_prebuilt_binary {
stl: "none",
target: {
musl_arm64: {
- srcs: ["linux_musl-arm64/bin/py3-launcher-autorun-static64"]
+ srcs: ["linux_musl-arm64/bin/py3-launcher-autorun-static64"],
},
musl_x86_64: {
- srcs: ["linux_musl-x86/bin/py3-launcher-autorun-static64"]
+ srcs: ["linux_musl-x86/bin/py3-launcher-autorun-static64"],
},
},