mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
Remove use of Vendor.behavior in AMBuild scripts
This commit is contained in:
parent
664c25bdac
commit
07f87990ef
@ -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']
|
||||||
|
Loading…
Reference in New Issue
Block a user