mirror of
https://github.com/Z3Prover/z3
synced 2026-02-22 00:07:36 +00:00
Merge pull request #8696 from Z3Prover/copilot/fix-z3-import-error
Fix arm64 libz3.dylib being packaged in x86_64 macOS wheels
This commit is contained in:
commit
ca1865c3fe
2 changed files with 9 additions and 0 deletions
|
|
@ -140,6 +140,10 @@ def mk_build_dir(path):
|
|||
opts.append('--python')
|
||||
if mk_util.IS_ARCH_ARM64:
|
||||
opts.append('--arm64=true')
|
||||
elif HOST_IS_ARM64:
|
||||
# Explicitly disable arm64 when cross-compiling from ARM64 host to x64;
|
||||
# without this, mk_make.py detects the ARM64 host and adds -arch arm64 flags
|
||||
opts.append('--arm64=false')
|
||||
if mk_util.IS_ARCH_ARM64 and LINUX_X64:
|
||||
# we are on x64 machine but build for arm64
|
||||
# so we have to do cross compiling on Linux
|
||||
|
|
|
|||
|
|
@ -2756,6 +2756,11 @@ def mk_config():
|
|||
CXXFLAGS = '%s -arch arm64' % CXXFLAGS
|
||||
LDFLAGS = '%s -arch arm64' % LDFLAGS
|
||||
SLIBEXTRAFLAGS = '%s -arch arm64' % SLIBEXTRAFLAGS
|
||||
elif IS_OSX and os.uname()[4] == 'arm64':
|
||||
# Cross-compiling from ARM64 host to x86_64: ensure the shared library
|
||||
# linker also targets x86_64 (LDFLAGS already contains -arch x86_64
|
||||
# from the environment, but SLIBEXTRAFLAGS is independent)
|
||||
SLIBEXTRAFLAGS = '%s -arch x86_64' % SLIBEXTRAFLAGS
|
||||
if IS_OSX:
|
||||
SLIBFLAGS += ' -Wl,-headerpad_max_install_names'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue