diff options
author | Dan Willemsen <dwillemsen@google.com> | 2022-06-23 12:48:39 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2022-06-23 12:48:39 -0400 |
commit | 721fbffb4c8d131ae18d7a5103e462686a862e27 (patch) | |
tree | 2a5a40b235298ca5958da43fbceb51394a5b78e2 | |
parent | 3caf60f04429903e9737d33b3120a4565d6f1fce (diff) | |
download | m4-721fbffb4c8d131ae18d7a5103e462686a862e27.tar.gz |
m4: Support darwin/arm64 configs
It's the same as darwin/x86_64, we just need to let the compiler do
the architecture defines.
Bug: 236277598
Test: treehugger; local test of univeral build-tools build
Change-Id: Ia1c12cbc77cba43ccb92f540600d6ac3fd350277
-rw-r--r-- | soong/darwin/config.h | 2 | ||||
-rwxr-xr-x | soong/regen.sh | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/soong/darwin/config.h b/soong/darwin/config.h index 1bc3d78..a3ffbf2 100644 --- a/soong/darwin/config.h +++ b/soong/darwin/config.h @@ -9,7 +9,7 @@ /* #undef __x86_64_x32__ */ #endif #ifndef __x86_64__ -#define __x86_64__ 1 +/* compiler-set */ #endif #ifndef __alpha__ /* #undef __alpha__ */ diff --git a/soong/regen.sh b/soong/regen.sh index 1089fd9..77089d7 100755 --- a/soong/regen.sh +++ b/soong/regen.sh @@ -94,6 +94,10 @@ cc_defaults { END ${ANDROID_BUILD_TOP}/prebuilts/build-tools/$UNAME-x86/bin/bpfmt -w ../Android.bp +if [ $DIR = "darwin" ]; then + sed -ibak 's%#define __x86_64__ 1%/* compiler-set */%' lib/config.h +fi + cd lib find . -name '*.h' | xargs -IX cp X ../../X cd ../.. |