From ffe4545eecba0afc235f3451de0237f10ace4910 Mon Sep 17 00:00:00 2001 From: Laurent Sansonetti Date: Mon, 6 May 2013 19:52:46 +0200 Subject: [PATCH] osx: only build for the native arch in development mode --- lib/motion/project/template/osx/config.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/motion/project/template/osx/config.rb b/lib/motion/project/template/osx/config.rb index 01508871..67bb6713 100644 --- a/lib/motion/project/template/osx/config.rb +++ b/lib/motion/project/template/osx/config.rb @@ -42,6 +42,18 @@ module Motion; module Project; def local_platform; 'MacOSX'; end def deploy_platform; 'MacOSX'; end + def archs + archs = super + if development? + # We only build for the native architecture in development mode, to speed up builds. + native_arch = `/usr/bin/uname -m`.strip + if archs['MacOSX'].include?(native_arch) + archs['MacOSX'] = [native_arch] + end + end + archs + end + def locate_compiler(platform, *execs) execs.each do |exec| cc = File.join('/usr/bin', exec)