From b5f6be6733e9a9e4e8d9c1309be84f6f87840034 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 30 Jan 2019 15:30:36 +0530 Subject: [PATCH] macos: lipo from older xcode does not support -archs --- mesonbuild/mesonlib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index 09228dca5..939b4cb19 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -468,10 +468,11 @@ def darwin_get_object_archs(objpath): to fetch the list of archs supported by it. Supports both thin objects and 'fat' objects. ''' - _, stdo, stderr = Popen_safe(['lipo', '-archs', objpath]) + _, stdo, stderr = Popen_safe(['lipo', '-info', objpath]) if not stdo: mlog.debug('lipo {}: {}'.format(objpath, stderr)) return None + stdo = stdo.rsplit(': ', 1)[1] # Convert from lipo-style archs to meson-style CPUs stdo = stdo.replace('i386', 'x86') # Add generic name for armv7 and armv7s