Skip to content

Commit 01a64c2

Browse files
authored
Merge pull request #86 from bgilbert/universal
Explicitly fail if macOS universal build is attempted
2 parents f9abe8f + 73fdeec commit 01a64c2

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## main
22

33
* fix build with uthash \< 2.3.0 [bgilbert]
4+
* explicitly fail if macOS universal build is attempted [bgilbert]
45

56
## 1.1.0, 28/3/24
67

meson.build

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ version_data.set10('DCM_STATIC', get_option('default_library') == 'static')
6363

6464
# dependencies
6565
cc = meson.get_compiler('c')
66+
if host_machine.system() == 'darwin' and not cc.has_header('stdio.h')
67+
# Certain compiler checks fail with -arch x86_64 -arch arm64. Detect this
68+
# in advance.
69+
# https://github.com/mesonbuild/meson/issues/5290
70+
# https://github.com/mesonbuild/meson/issues/8206
71+
error('Basic environment check failed. Check compiler flags; building for multiple CPU architectures is not supported.')
72+
endif
6673
found_uthash = cc.check_header(
6774
'utarray.h',
6875
required : false

0 commit comments

Comments
 (0)