summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2020-11-24 12:16:44 +0000
committerMatthew Waters <matthew@centricular.com>2020-12-07 13:35:23 +1100
commit3e98d9ef0d005f182fb69d8081db4d14b5f99d0d (patch)
treef8dd28e76d68339f621c43c2cab551a4f30a0149 /config
parent459e09c9a683eb164c1f7bd86b1ec257e256323c (diff)
macos: add support for targetting ARM64
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/661>
Diffstat (limited to 'config')
-rw-r--r--config/darwin.config22
1 files changed, 18 insertions, 4 deletions
diff --git a/config/darwin.config b/config/darwin.config
index a4dcf4dc..601f2c59 100644
--- a/config/darwin.config
+++ b/config/darwin.config
@@ -15,14 +15,25 @@ allow_system_libs=False
# Enable introspection by default
variants.override('gi')
+if arch == Architecture.X86_64:
+ build = 'x86_64-apple-darwin12'
+elif arch == Architecture.X86:
+ build = 'i386-apple-darwin12'
+elif arch == Architecture.ARM64:
+ build = 'aarch64-apple-darwin12'
+elif arch == Architecture.UNIVERSAL:
+ build = 'universal-apple-darwin12'
+
if target_arch == Architecture.X86_64:
- build='x86_64-apple-darwin12'
+ host = 'x86_64-apple-darwin12'
elif target_arch == Architecture.X86:
- build='i386-apple-darwin12'
+ host = 'i386-apple-darwin12'
+elif target_arch == Architecture.ARM64:
+ host = 'aarch64-apple-darwin12'
elif target_arch == Architecture.UNIVERSAL:
- build='universal-apple-darwin12'
+ host = 'universal-apple-darwin12'
-# By default we ask for the 'latest' SDK. This can be overriden by
+# By default we ask for the 'latest' SDK. This can be overriden by
# configure using 'osx_target_sdk_version' (e.g. set to '10.10')
sdk_requested_version = '' # Empty == latest
if osx_target_sdk_version is not None:
@@ -55,6 +66,9 @@ elif target_arch == Architecture.X86:
arch_cflags += ' -arch i386 -m32'
arch_ldflags += ' -arch i386 -m32 -Wl,-arch,i386'
env['VERSIONER_PYTHON_PREFER_32_BIT'] = 'yes'
+elif target_arch == Architecture.ARM64:
+ arch_cflags += ' -arch arm64 -m64'
+ arch_ldflags += ' -arch arm64 -m64 -Wl,-arch,arm64'
arch_cflags += ' -Wno-error=format-nonliteral '