summaryrefslogtreecommitdiff
path: root/config/darwin.config
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2020-11-24 12:16:44 +0000
committerTim-Philipp Müller <tim@centricular.com>2021-01-13 01:04:27 +0000
commit0ab26d6f3ed7bcd53569e5a0298a8d76424b6ade (patch)
tree4979d03637c4603508eac8d10e30139d722d5fe8 /config/darwin.config
parent466369b1ca41ca54f44452370534ac112b9e7245 (diff)
macos: add support for targetting ARM64
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/661>
Diffstat (limited to 'config/darwin.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 cb522585..bcd9775a 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 '
arch_cflags += ' -Wno-error=implicit-function-declaration '