Port the PDB log to AMBuild 2 (bug 5997 part 11, r=ds).

This commit is contained in:
David Anderson 2013-12-30 17:51:00 -05:00
parent f82224eba0
commit ae21f29ad9
2 changed files with 9 additions and 6 deletions

View File

@ -141,7 +141,6 @@ class SMConfig(object):
'-Wno-switch', '-Wno-switch',
'-msse', '-msse',
'-m32', '-m32',
'-g3',
] ]
have_gcc = cxx.name is 'gcc' have_gcc = cxx.name is 'gcc'
@ -178,7 +177,6 @@ class SMConfig(object):
] ]
cfg.cflags += [ cfg.cflags += [
'/W3', '/W3',
'/Zi',
] ]
cfg.cxxflags += [ cfg.cxxflags += [
'/EHsc', '/EHsc',
@ -186,7 +184,6 @@ class SMConfig(object):
'/TP', '/TP',
] ]
cfg.linkflags += [ cfg.linkflags += [
'/DEBUG',
'/MACHINE:X86', '/MACHINE:X86',
'/SUBSYSTEM:WINDOWS', '/SUBSYSTEM:WINDOWS',
'kernel32.lib', 'kernel32.lib',
@ -215,9 +212,7 @@ class SMConfig(object):
# Debugging # Debugging
if builder.options.debug == '1': if builder.options.debug == '1':
cfg.defines += ['DEBUG', '_DEBUG'] cfg.defines += ['DEBUG', '_DEBUG']
if cxx.behavior == 'gcc': if cxx.behavior == 'msvc':
cfg.cflags += ['-g3']
elif cxx.behavior == 'msvc':
cfg.cflags += ['/Od', '/RTC1'] cfg.cflags += ['/Od', '/RTC1']
# This needs to be after our optimization flags which could otherwise disable it. # This needs to be after our optimization flags which could otherwise disable it.

View File

@ -51,6 +51,14 @@ for cxx_task in SM.extensions:
builder.AddCopy(cxx_task.binary, folder_map['addons/sourcemod/extensions']) builder.AddCopy(cxx_task.binary, folder_map['addons/sourcemod/extensions'])
builder.AddCopy(SM.spcomp.binary, folder_map['addons/sourcemod/scripting']) builder.AddCopy(SM.spcomp.binary, folder_map['addons/sourcemod/scripting'])
# Export PDB files. We write to a file in the build folder which is pretty
# verboten, but it's okay if it's in the root since AMBuild will never try
# to rmdir the root.
full_binary_list = SM.binaries + SM.extensions + [SM.spcomp]
with open(os.path.join(builder.buildPath, 'pdblog.txt'), 'w') as fp:
for task in full_binary_list:
fp.write(task.debug.path + '\n')
# Copy plugins. # Copy plugins.
disabled_plugins = set([ disabled_plugins = set([
'admin-sql-prefetch.smx', 'admin-sql-prefetch.smx',