Another attempt to fix windows compilation (#556)

This commit is contained in:
Vincent Herbet 2018-09-08 21:12:57 +02:00 committed by GitHub
parent 9a2c586720
commit d2d121619f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 3 deletions

View File

@ -291,6 +291,9 @@ class AMXXConfig(object):
'odbccp32.lib',
]
if cxx.version >= 1900:
cxx.linkflags += ['legacy_stdio_definitions.lib', 'legacy_stdio_wide_specifiers.lib']
if builder.options.opt == '1':
cxx.cflags += ['/Ox']
cxx.linkflags += ['/OPT:ICF', '/OPT:REF']

View File

@ -36,9 +36,8 @@ if AMXX.mysql_path:
'/SECTION:.data,RW'
]
if binary.compiler.vendor == 'msvc' and binary.compiler.version >= 1900:
binary.compiler.linkflags += ['legacy_stdio_definitions.lib', 'legacy_stdio_wide_specifiers.lib']
binary.sources += [
'msvc15hack.c'
'../../public/msvc/msvc15hack.c'
]
binary.compiler.linkflags += [AMXX.zlib.binary]

View File

@ -24,5 +24,9 @@ binary.sources = [
if builder.target_platform == 'windows':
binary.sources += ['version.rc']
if binary.compiler.vendor == 'msvc' and binary.compiler.version >= 1900:
binary.sources += [
'../../public/msvc/msvc15hack.c'
]
AMXX.modules += [builder.Add(binary)]