Skip to content

Commit

Permalink
add arm64 auto-detect
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Apr 7, 2022
1 parent 8c2909f commit c47bd1d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/mk_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,6 @@ def check_eol():
elif os.name == 'posix':
if os.uname()[0] == 'Darwin':
IS_OSX=True
print("setting Darwin", os.uname()[4])
if os.uname()[4] == 'arm64':
IS_OS_ARM64 = True
elif os.uname()[0] == 'Linux':
Expand Down Expand Up @@ -2640,6 +2639,10 @@ def mk_config():
LDFLAGS = '%s -static-libgcc -static-libstdc++' % LDFLAGS
if sysname == 'Linux' and machine.startswith('armv7') or machine.startswith('armv8'):
CXXFLAGS = '%s -fpic' % CXXFLAGS
if IS_OSX and IS_OS_ARM64:
CXXFLAGS = '%s -arch arm64' % CXXFLAGS
LDFLAGS = '%s -arch arm64' % LDFLAGS
SLIBEXTRAFLAGS = '%s -arch arm64' % SLIBEXTRAFLAGS

config.write('PREFIX=%s\n' % PREFIX)
config.write('CC=%s\n' % CC)
Expand Down

0 comments on commit c47bd1d

Please sign in to comment.