Remove use of Vendor.behavior in AMBuild scripts

This commit is contained in:
Arkshine 2016-02-03 21:23:23 +01:00
parent 664c25bdac
commit 07f87990ef

View File

@ -123,7 +123,7 @@ class AMXXConfig(object):
cfg = builder.DetectCompilers() cfg = builder.DetectCompilers()
cxx = cfg.cxx cxx = cfg.cxx
if cxx.behavior == 'gcc': if cxx.like('gcc'):
cfg.cflags += [ cfg.cflags += [
'-pipe', '-pipe',
'-fno-strict-aliasing', '-fno-strict-aliasing',
@ -215,16 +215,16 @@ class AMXXConfig(object):
# Optimization # Optimization
if builder.options.opt == '1': if builder.options.opt == '1':
cfg.defines += ['NDEBUG'] cfg.defines += ['NDEBUG']
if cxx.behavior == 'gcc': if cxx.like('gcc'):
cfg.cflags += ['-O2'] cfg.cflags += ['-O2']
elif cxx.behavior == 'msvc': elif cxx.like('msvc'):
cfg.cflags += ['/Ox'] cfg.cflags += ['/Ox']
cfg.linkflags += ['/OPT:ICF', '/OPT:REF'] cfg.linkflags += ['/OPT:ICF', '/OPT:REF']
# Debugging # Debugging
if builder.options.debug == '1': if builder.options.debug == '1':
cfg.defines += ['DEBUG', '_DEBUG'] cfg.defines += ['DEBUG', '_DEBUG']
if cxx.behavior == 'msvc': if cxx.like('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.
@ -240,7 +240,7 @@ class AMXXConfig(object):
cfg.postlink += ['-static-libgcc'] cfg.postlink += ['-static-libgcc']
elif cxx.name == 'clang': elif cxx.name == 'clang':
cfg.postlink += ['-lgcc_eh'] cfg.postlink += ['-lgcc_eh']
if cxx.behavior == 'gcc': if cxx.like('gcc'):
self.stdcxx_path = self.invokeCompiler(['-m32', '-print-file-name=' + 'libstdc++.a'])[0] self.stdcxx_path = self.invokeCompiler(['-m32', '-print-file-name=' + 'libstdc++.a'])[0]
elif builder.target_platform == 'mac': elif builder.target_platform == 'mac':
cfg.defines += ['OSX', '_OSX', 'POSIX'] cfg.defines += ['OSX', '_OSX', 'POSIX']