From c2e3b70b3764dba6d026cfa0a579f1e9503d09d5 Mon Sep 17 00:00:00 2001 From: Aydar Zarifullin Date: Sun, 9 Jun 2019 04:25:26 +0400 Subject: [PATCH] hlsdk wscript fix (#82) * hlsdk wscript fix * indentation fix --- wscript | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/wscript b/wscript index 97131abb..ede9efa4 100644 --- a/wscript +++ b/wscript @@ -7,7 +7,6 @@ from waflib import Logs import sys import os sys.path.append(os.path.realpath('scripts/waflib')) -import fwgslib VERSION = '2.4' APPNAME = 'hlsdk-xash3d' @@ -89,50 +88,50 @@ def configure(conf): linker_flags = { 'common': { - 'msvc': ['/DEBUG'], # always create PDB, doesn't affect result binaries - 'gcc': ['-Wl,--no-undefined'] + 'msvc': ['/DEBUG'], # always create PDB, doesn't affect result binaries + 'gcc': ['-Wl,--no-undefined'] }, 'sanitize': { - 'gcc': ['-fsanitize=undefined', '-fsanitize=address'], + 'gcc': ['-fsanitize=undefined', '-fsanitize=address'], } } compiler_c_cxx_flags = { 'common': { - 'msvc': ['/D_USING_V110_SDK71_', '/Zi', '/FS'], + 'msvc': ['/D_USING_V110_SDK71_', '/Zi', '/FS'], 'clang': ['-g', '-gdwarf-2'], - 'gcc': ['-g', '-Werror=implicit-function-declaration', '-fdiagnostics-color=always'] + 'gcc': ['-g', '-Werror=implicit-function-declaration', '-fdiagnostics-color=always'] }, 'fast': { - 'msvc': ['/O2', '/Oy'], #todo: check /GL /LTCG - 'gcc': ['-Ofast', '-march=native', '-funsafe-math-optimizations', '-funsafe-loop-optimizations', '-fomit-frame-pointer'], + 'msvc': ['/O2', '/Oy'], #todo: check /GL /LTCG + 'gcc': ['-Ofast', '-march=native', '-funsafe-math-optimizations', '-funsafe-loop-optimizations', '-fomit-frame-pointer'], 'default': ['-O3'] }, 'release': { - 'msvc': ['/O2'], + 'msvc': ['/O2'], 'default': ['-O3'] }, 'debug': { - 'msvc': ['/O1'], - 'gcc': ['-Og'], + 'msvc': ['/O1'], + 'gcc': ['-Og'], 'default': ['-O1'] }, 'sanitize': { - 'msvc': ['/Od', '/RTC1'], - 'gcc': ['-Og', '-fsanitize=undefined', '-fsanitize=address'], + 'msvc': ['/Od', '/RTC1'], + 'gcc': ['-Og', '-fsanitize=undefined', '-fsanitize=address'], 'default': ['-O1'] }, 'nooptimize': { - 'msvc': ['/Od'], + 'msvc': ['/Od'], 'default': ['-O0'] } } - conf.env.append_unique('CFLAGS', fwgslib.get_flags_by_type( + conf.env.append_unique('CFLAGS', conf.get_flags_by_type( compiler_c_cxx_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC)) - conf.env.append_unique('CXXFLAGS', fwgslib.get_flags_by_type( + conf.env.append_unique('CXXFLAGS', conf.get_flags_by_type( compiler_c_cxx_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC)) - conf.env.append_unique('LINKFLAGS', fwgslib.get_flags_by_type( + conf.env.append_unique('LINKFLAGS', conf.get_flags_by_type( linker_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC)) if conf.env.COMPILER_CC == 'msvc': @@ -144,11 +143,11 @@ def configure(conf): conf.env.append_unique('CXXFLAGS', cflags + ['-Wno-invalid-offsetof', '-fno-rtti', '-fno-exceptions']) # strip lib from pattern - if conf.env.DEST_OS in ['linux', 'darwin'] and conf.env.DEST_OS2 not in ['android']: - if conf.env.cshlib_PATTERN.startswith('lib'): - conf.env.cshlib_PATTERN = conf.env.cshlib_PATTERN[3:] - if conf.env.cxxshlib_PATTERN.startswith('lib'): - conf.env.cxxshlib_PATTERN = conf.env.cxxshlib_PATTERN[3:] + if conf.env.DEST_OS in ['linux', 'darwin'] and conf.env.DEST_OS2 not in ['android']: + if conf.env.cshlib_PATTERN.startswith('lib'): + conf.env.cshlib_PATTERN = conf.env.cshlib_PATTERN[3:] + if conf.env.cxxshlib_PATTERN.startswith('lib'): + conf.env.cxxshlib_PATTERN = conf.env.cxxshlib_PATTERN[3:] conf.env.append_unique('DEFINES', 'CLIENT_WEAPONS')