From fde9580e7fb84659bbd45aa95d4ac49a021b01d2 Mon Sep 17 00:00:00 2001 From: Laurent Sansonetti Date: Sat, 11 Oct 2014 19:57:35 +0200 Subject: [PATCH] simplify the arm64 object compilation even better + fix warnings due to overriding the module triple --- lib/motion/project/builder.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/motion/project/builder.rb b/lib/motion/project/builder.rb index b682b001..035e291e 100644 --- a/lib/motion/project/builder.rb +++ b/lib/motion/project/builder.rb @@ -145,12 +145,8 @@ module Motion; module Project; # Object arch_obj = File.join(files_build_dir, "#{path}.#{arch}.o") - if arm64 - # At the time of this writing Apple hasn't yet contributed the source code of the LLVM backend for the "arm64" architecture, so the RubyMotion compiler can't emit proper assembly yet. We work around this limitation by generating bitcode instead and giving it to the linker. Ugly but should be temporary (right?). - sh "#{cc} -fexceptions -c -arch #{arch} -miphoneos-version-min=7.0 \"#{asm}\" -o \"#{arch_obj}\"" - else - sh "#{cc} -fexceptions -c -arch #{arch} \"#{asm}\" -o \"#{arch_obj}\"" - end + arch_obj_flags = arm64 ? "-miphoneos-version-min=#{config.deployment_target}" : '' + sh "#{cc} -fexceptions -c -arch #{arch} #{arch_obj_flags} \"#{asm}\" -o \"#{arch_obj}\"" [asm].each { |x| File.unlink(x) } unless ENV['keep_temps'] arch_objs << arch_obj