diff options
author | Cole Faust <colefaust@google.com> | 2024-04-18 11:21:17 -0700 |
---|---|---|
committer | Cole Faust <colefaust@google.com> | 2024-04-18 11:31:27 -0700 |
commit | 796175fd6e38471d61799622af7a18f5e75ecc54 (patch) | |
tree | f7453ff264b3ebdae5bb3b0547457819998d49b8 | |
parent | 2256ec1ce2dd55955916844fcf37001f467dec69 (diff) | |
download | build-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.bp | 28 |
1 files changed, 18 insertions, 10 deletions
@@ -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"], }, }, |