From d2d31c3cc2c22a4ca1dd6464a6f9ecc40a725f0f Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Mon, 22 Aug 2022 09:01:21 -0700 Subject: macos: map arm64e to aarch64, map "whole" architecture strings Some macos libraries use arm64e instead of arm64 as architecture. Due to the string replace approach taken so far, we'd end up with aarch64e as architecture, which the rest of meson doesn't know. Move architecture mapping to map whole architecture names and add arm64e -> aarch64 mapping. This change doesn't touch the case for armv7[s], where we add arm, rather than replace armv7[s], but it's certainly not in line with the other mappings. Fixes: #9493 Co-authored-by: Tristan Partin --- unittests/darwintests.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'unittests') diff --git a/unittests/darwintests.py b/unittests/darwintests.py index 254b3d0..1f17760 100644 --- a/unittests/darwintests.py +++ b/unittests/darwintests.py @@ -148,3 +148,8 @@ class DarwinTests(BasePlatformTests): testdir = os.path.join(self.objcpp_test_dir, '1 simple') self.init(testdir) self.assertIn('-std=c++14', self.get_compdb()[0]['command']) + + def test_darwin_get_object_archs(self): + from mesonbuild.mesonlib import darwin_get_object_archs + archs = darwin_get_object_archs('/System/Library/CoreServices/Encodings/libSymbolConverter.dylib') + self.assertEqual(archs, ['x86_64', 'aarch64']) -- cgit v1.1