Merge pull request #14565 from bruvzg/mingw-specific-binutils

Use MinGW specific binutils for debug symbols separation.
This commit is contained in:
Rémi Verschelde 2017-12-12 00:15:26 +01:00 committed by GitHub
commit f15c255916
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,9 +4,14 @@ import os
Import('env') Import('env')
def make_debug_mingw(target, source, env): def make_debug_mingw(target, source, env):
os.system('objcopy --only-keep-debug %s %s.debug' % (target[0], target[0])) mingw_prefix = ""
os.system('strip --strip-debug --strip-unneeded %s' % (target[0])) if (env["bits"] == "32"):
os.system('objcopy --add-gnu-debuglink=%s.debug %s' % (target[0], target[0])) mingw_prefix = env["mingw_prefix_32"]
else:
mingw_prefix = env["mingw_prefix_64"]
os.system(mingw_prefix + 'objcopy --only-keep-debug %s %s.debug' % (target[0], target[0]))
os.system(mingw_prefix + 'strip --strip-debug --strip-unneeded %s' % (target[0]))
os.system(mingw_prefix + 'objcopy --add-gnu-debuglink=%s.debug %s' % (target[0], target[0]))
common_win = [ common_win = [
"context_gl_win.cpp", "context_gl_win.cpp",