diff --git a/lib/motion/project/builder.rb b/lib/motion/project/builder.rb index 520202e2..7f7c4ea5 100644 --- a/lib/motion/project/builder.rb +++ b/lib/motion/project/builder.rb @@ -414,7 +414,7 @@ EOS # Strip all symbols. Only in distribution mode. if main_exec_created and config.distribution_mode App.info "Strip", main_exec - sh "#{config.locate_binary('strip')} \"#{main_exec}\"" + sh "#{config.locate_binary('strip')} #{config.strip_args} \"#{main_exec}\"" end end diff --git a/lib/motion/project/config.rb b/lib/motion/project/config.rb index e659658c..def11440 100644 --- a/lib/motion/project/config.rb +++ b/lib/motion/project/config.rb @@ -287,6 +287,10 @@ module Motion; module Project File.join(motiondir, 'data', template.to_s, target) end + def strip_args + '' + end + def print_crash_message $stderr.puts '' $stderr.puts '=' * 80 diff --git a/lib/motion/project/template/osx/config.rb b/lib/motion/project/template/osx/config.rb index c8c336fc..7caf0250 100644 --- a/lib/motion/project/template/osx/config.rb +++ b/lib/motion/project/template/osx/config.rb @@ -116,6 +116,11 @@ module Motion; module Project; }.merge(generic_info_plist).merge(dt_info_plist).merge(info_plist)) end + def strip_args + # We only strip x86_64 symbols, because attempting to strip i386 symbols results in a 'symbols referenced by indirect symbol table entries that can't be stripped' error. + '-arch x86_64' + end + def supported_sdk_versions(versions) osx_version = `sw_vers -productVersion`.strip versions.reverse.find { |vers|