Merge.
This commit is contained in:
commit
cd729f054c
@ -2,7 +2,6 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from ambuild.command import SymlinkCommand
|
from ambuild.command import SymlinkCommand
|
||||||
from ambuild.command import ShellCommand
|
|
||||||
|
|
||||||
class SM:
|
class SM:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -115,7 +114,6 @@ class SM:
|
|||||||
self.compiler.AddToListVar('CFLAGS', '-Wno-switch')
|
self.compiler.AddToListVar('CFLAGS', '-Wno-switch')
|
||||||
self.compiler.AddToListVar('CFLAGS', '-msse')
|
self.compiler.AddToListVar('CFLAGS', '-msse')
|
||||||
self.compiler.AddToListVar('CFLAGS', '-m32')
|
self.compiler.AddToListVar('CFLAGS', '-m32')
|
||||||
self.compiler.AddToListVar('CFLAGS', '-g3')
|
|
||||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-m32')
|
self.compiler.AddToListVar('POSTLINKFLAGS', '-m32')
|
||||||
self.compiler.AddToListVar('CXXFLAGS', '-fno-exceptions')
|
self.compiler.AddToListVar('CXXFLAGS', '-fno-exceptions')
|
||||||
self.compiler.AddToListVar('CXXFLAGS', '-fno-rtti')
|
self.compiler.AddToListVar('CXXFLAGS', '-fno-rtti')
|
||||||
@ -175,7 +173,9 @@ class SM:
|
|||||||
if AMBuild.options.debug == '1':
|
if AMBuild.options.debug == '1':
|
||||||
self.compiler.AddToListVar('CDEFINES', 'DEBUG')
|
self.compiler.AddToListVar('CDEFINES', 'DEBUG')
|
||||||
self.compiler.AddToListVar('CDEFINES', '_DEBUG')
|
self.compiler.AddToListVar('CDEFINES', '_DEBUG')
|
||||||
if self.vendor == 'msvc':
|
if self.vendor == 'gcc' or self.vendor == 'clang':
|
||||||
|
self.compiler.AddToListVar('CFLAGS', '-g3')
|
||||||
|
elif self.vendor == 'msvc':
|
||||||
self.compiler.AddToListVar('CFLAGS', '/Od')
|
self.compiler.AddToListVar('CFLAGS', '/Od')
|
||||||
self.compiler.AddToListVar('CFLAGS', '/RTC1')
|
self.compiler.AddToListVar('CFLAGS', '/RTC1')
|
||||||
|
|
||||||
@ -259,19 +259,6 @@ class SM:
|
|||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|
||||||
def StripBinary(self, job, binary):
|
|
||||||
workFolder = os.path.join(AMBuild.outputFolder, job.workFolder)
|
|
||||||
src = os.path.join('..', workFolder, binary.binaryFile)
|
|
||||||
if not binary.NeedsRelink(src):
|
|
||||||
return;
|
|
||||||
if AMBuild.target['platform'] == 'linux':
|
|
||||||
job.AddCommand(ShellCommand('objcopy --only-keep-debug ' + src + ' ' + src + '.dbg'))
|
|
||||||
job.AddCommand(ShellCommand('objcopy --strip-debug ' + src))
|
|
||||||
job.AddCommand(ShellCommand('objcopy --add-gnu-debuglink=' + src + '.dbg ' + src))
|
|
||||||
elif AMBuild.target['platform'] == 'darwin':
|
|
||||||
job.AddCommand(ShellCommand('dsymutil ' + src))
|
|
||||||
job.AddCommand(ShellCommand('strip -S ' + src))
|
|
||||||
|
|
||||||
def PreSetupHL2Job(self, job, builder, sdk):
|
def PreSetupHL2Job(self, job, builder, sdk):
|
||||||
info = self.sdkInfo[sdk]
|
info = self.sdkInfo[sdk]
|
||||||
sdkPath = AMBuild.cache[info['sdk']]
|
sdkPath = AMBuild.cache[info['sdk']]
|
||||||
|
@ -75,4 +75,4 @@ for i in SM.sdkInfo:
|
|||||||
SM.PostSetupHL2Job(extension, binary, i)
|
SM.PostSetupHL2Job(extension, binary, i)
|
||||||
SM.AutoVersion('core', binary)
|
SM.AutoVersion('core', binary)
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
SM.StripBinary(extension, binary)
|
|
||||||
|
@ -56,5 +56,4 @@ else:
|
|||||||
binary.AddSourceFiles('core/logic', files)
|
binary.AddSourceFiles('core/logic', files)
|
||||||
SM.AutoVersion('core/logic', binary)
|
SM.AutoVersion('core/logic', binary)
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
SM.StripBinary(extension, binary)
|
|
||||||
|
|
||||||
|
@ -20,4 +20,5 @@ binary.AddSourceFiles('extensions/bintools', [
|
|||||||
])
|
])
|
||||||
SM.AutoVersion('extensions/bintools', binary)
|
SM.AutoVersion('extensions/bintools', binary)
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
SM.StripBinary(extension, binary)
|
|
||||||
|
|
||||||
|
@ -16,4 +16,4 @@ binary.AddSourceFiles('extensions/clientprefs', [
|
|||||||
])
|
])
|
||||||
SM.AutoVersion('extensions/clientprefs', binary)
|
SM.AutoVersion('extensions/clientprefs', binary)
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
SM.StripBinary(extension, binary)
|
|
||||||
|
@ -22,5 +22,4 @@ if AMBuild.target['platform'] in sdk['platform']:
|
|||||||
])
|
])
|
||||||
SM.PostSetupHL2Job(extension, binary, 'ep2v')
|
SM.PostSetupHL2Job(extension, binary, 'ep2v')
|
||||||
SM.AutoVersion('extensions/cstrike', binary)
|
SM.AutoVersion('extensions/cstrike', binary)
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
SM.StripBinary(extension, binary)
|
|
@ -83,4 +83,4 @@ elif AMBuild.target['platform'] == 'windows':
|
|||||||
|
|
||||||
SM.AutoVersion('extensions/curl', binary)
|
SM.AutoVersion('extensions/curl', binary)
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
SM.StripBinary(extension, binary)
|
|
||||||
|
@ -12,4 +12,4 @@ if AMBuild.target['platform'] == 'windows':
|
|||||||
binary['POSTLINKFLAGS'].append('wsock32.lib')
|
binary['POSTLINKFLAGS'].append('wsock32.lib')
|
||||||
SM.AutoVersion('extensions/geoip', binary)
|
SM.AutoVersion('extensions/geoip', binary)
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
SM.StripBinary(extension, binary)
|
|
||||||
|
@ -35,4 +35,4 @@ binary.AddSourceFiles('extensions/mysql', [
|
|||||||
])
|
])
|
||||||
SM.AutoVersion('extensions/mysql', binary)
|
SM.AutoVersion('extensions/mysql', binary)
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
SM.StripBinary(extension, binary)
|
|
||||||
|
@ -24,4 +24,4 @@ binary.AddSourceFiles('extensions/regex', [
|
|||||||
])
|
])
|
||||||
SM.AutoVersion('extensions/regex', binary)
|
SM.AutoVersion('extensions/regex', binary)
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
SM.StripBinary(extension, binary)
|
|
||||||
|
@ -49,4 +49,4 @@ for i in SM.sdkInfo:
|
|||||||
SM.PostSetupHL2Job(extension, binary, i)
|
SM.PostSetupHL2Job(extension, binary, i)
|
||||||
SM.AutoVersion('extensions/sdktools', binary)
|
SM.AutoVersion('extensions/sdktools', binary)
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
SM.StripBinary(extension, binary)
|
|
||||||
|
@ -37,4 +37,4 @@ elif AMBuild.target['platform'] == 'linux' or AMBuild.target['platform'] == 'dar
|
|||||||
binary.AddSourceFiles('extensions/sqlite', files)
|
binary.AddSourceFiles('extensions/sqlite', files)
|
||||||
SM.AutoVersion('extensions/sqlite', binary)
|
SM.AutoVersion('extensions/sqlite', binary)
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
SM.StripBinary(extension, binary)
|
|
||||||
|
@ -26,4 +26,4 @@ binary.AddSourceFiles('extensions/tf2', [
|
|||||||
SM.PostSetupHL2Job(extension, binary, 'ep2v')
|
SM.PostSetupHL2Job(extension, binary, 'ep2v')
|
||||||
SM.AutoVersion('extensions/tf2', binary)
|
SM.AutoVersion('extensions/tf2', binary)
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
SM.StripBinary(extension, binary)
|
|
||||||
|
@ -16,4 +16,4 @@ binary.AddSourceFiles('extensions/topmenus', [
|
|||||||
])
|
])
|
||||||
SM.AutoVersion('extensions/topmenus', binary)
|
SM.AutoVersion('extensions/topmenus', binary)
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
SM.StripBinary(extension, binary)
|
|
||||||
|
@ -15,4 +15,4 @@ binary.AddSourceFiles('extensions/updater', [
|
|||||||
])
|
])
|
||||||
SM.AutoVersion('extensions/updater', binary)
|
SM.AutoVersion('extensions/updater', binary)
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
SM.StripBinary(extension, binary)
|
|
||||||
|
@ -18,4 +18,4 @@ binary.AddSourceFiles('loader', [
|
|||||||
])
|
])
|
||||||
SM.AutoVersion('loader', binary)
|
SM.AutoVersion('loader', binary)
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
SM.StripBinary(loader, binary)
|
|
||||||
|
@ -65,4 +65,4 @@ if AMBuild.target['platform'] == 'windows':
|
|||||||
binary.AddResourceFile('sourcepawn/compiler/libpawnc.rc', env)
|
binary.AddResourceFile('sourcepawn/compiler/libpawnc.rc', env)
|
||||||
|
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
SM.StripBinary(extension, binary)
|
|
||||||
|
@ -40,4 +40,4 @@ binary.AddSourceFiles('sourcepawn/jit', [
|
|||||||
])
|
])
|
||||||
SM.AutoVersion('sourcepawn/jit', binary)
|
SM.AutoVersion('sourcepawn/jit', binary)
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
SM.StripBinary(extension, binary)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user