mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-06-11 00:09:38 +08:00
simplify the arm64 object compilation even better + fix warnings due to overriding the module triple
This commit is contained in:
committed by
Watson
parent
fe29e58894
commit
fde9580e7f
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user