From 6c3bba734f6768db3705f63030431f2cc5f6b795 Mon Sep 17 00:00:00 2001 From: Andreas Fertig Date: Tue, 16 Jul 2024 09:00:00 +0200 Subject: [PATCH] Fix GH action compile with GCC on ARM, '-m64' seems to be unsupported. --- tests/runTest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/runTest.py b/tests/runTest.py index 8c75e21..99c1f79 100755 --- a/tests/runTest.py +++ b/tests/runTest.py @@ -65,7 +65,9 @@ def testCompile(tmpFileName, f, args, fileName, cppStd): cmd = [args['cxx'], cppStd, '-D__cxa_guard_acquire(x)=true', '-D__cxa_guard_release(x)', '-D__cxa_guard_abort(x)', '-I', os.getcwd()] if os.name != 'nt': - cmd.append('-m64') + arch = platform.architecture()[0] + if (arch != '64bit') or ((arch == '64bit') and (sys.platform == 'darwin')): + cmd.append('-m64') else: cmd.extend(['/nologo', '/EHsc', '/IGNORE:C4335']) # C4335: mac file format detected. EHsc assume only C++ functions throw exceptions.