From dd49cb621a0855ef455d26dfcab73140e8e485be Mon Sep 17 00:00:00 2001 From: Laurent Sansonetti Date: Fri, 10 Oct 2014 13:16:35 +0200 Subject: [PATCH] when compiling dummy files for arm64, ignore linker warnings about invalid version debug info (which seem to be caused by an Xcode bug) --- lib/motion/project/builder.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/motion/project/builder.rb b/lib/motion/project/builder.rb index e8e79682..ed8f95ee 100644 --- a/lib/motion/project/builder.rb +++ b/lib/motion/project/builder.rb @@ -155,7 +155,12 @@ module Motion; module Project; obj_path end ld_path = File.join(App.config.xcode_dir, 'Toolchains/XcodeDefault.xctoolchain/usr/bin/ld') - sh "#{ld_path} \"#{asm}\" \"#{@dummy_object_file}\" -arch arm64 -r -o \"#{arch_obj}\"" + line = "#{ld_path} \"#{asm}\" \"#{@dummy_object_file}\" -arch arm64 -r -o \"#{arch_obj}\" 2>&1" + # Ignore `warning: ignore debug info...' lines from the linker which seem to be caused by an Xcode bug. + puts line if Rake.application.options.trace + ld_output = `#{line}` + ld_output = ld_output.lines.select { |x| !x.match(/^warning: ignoring debug info with an invalid version/) }.join + $stderr.puts ld_output unless ld_output.strip.empty? else sh "#{cc} -fexceptions -c -arch #{arch} \"#{asm}\" -o \"#{arch_obj}\"" end