|
23 | 23 | def get_build_machine():
|
24 | 24 | machine = platform.machine()
|
25 | 25 | if machine == 'arm64' or machine == 'aarch64':
|
26 |
| - return 'arm64' |
| 26 | + return 'arm8' |
27 | 27 | return machine
|
28 | 28 |
|
| 29 | +def get_archflag_machine(): |
| 30 | + machine = platform.machine() |
| 31 | + if machine == 'arm64' or machine == 'aarch64': |
| 32 | + return 'arm64' |
| 33 | + return machine |
29 | 34 |
|
30 | 35 | def get_build_os():
|
31 | 36 | os = platform.system()
|
@@ -53,7 +58,7 @@ def get_build_triple(build_mpi):
|
53 | 58 | libcharm_filename2 = 'charm.lib'
|
54 | 59 | charmrun_filename = 'charmrun.exe'
|
55 | 60 | elif system == 'darwin':
|
56 |
| - os.environ['ARCHFLAGS'] = f'-arch {machine}' |
| 61 | + os.environ['ARCHFLAGS'] = f'-arch {get_archflag_machine()}' |
57 | 62 | libcharm_filename = 'libcharm.dylib'
|
58 | 63 | charmrun_filename = 'charmrun'
|
59 | 64 | if 'CPPFLAGS' in os.environ:
|
@@ -169,7 +174,7 @@ def build_libcharm(charm_src_dir, build_dir):
|
169 | 174 | raise DistutilsSetupError('An error occured while building charm library')
|
170 | 175 |
|
171 | 176 | if system == 'darwin':
|
172 |
| - old_file_path = os.path.join(charm_src_dir, 'charm', 'lib', 'libcharm.so') |
| 177 | + old_file_path = os.path.join(charm_src_dir, 'charm', 'lib', 'libcharm.dylib') |
173 | 178 | new_file_path = os.path.join(charm_src_dir, 'charm', 'lib', libcharm_filename)
|
174 | 179 | shutil.move(old_file_path, new_file_path)
|
175 | 180 | cmd = ['install_name_tool', '-id', '@rpath/../.libs/' + libcharm_filename, new_file_path]
|
|
0 commit comments