Browse Source

Merge pull request #106 from x6herbius/upstream-master

Build: Fixed GiveFnptrsToDll not being found on Windows
half-secret
Alibek Omarov 5 years ago committed by GitHub
parent
commit
251a38755a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      dlls/wscript
  2. 11
      wscript

13
dlls/wscript

@ -10,8 +10,15 @@ def options(opt):
return return
def configure(conf): def configure(conf):
# stub if conf.env.DEST_OS == 'win32':
return # hl.def removes MSVC function name decoration from GiveFnptrsToDll on Windows.
# Without this, the lookup for this function fails.
hlDefNode = conf.path.find_resource("./hl.def")
if hlDefNode is not None:
conf.env.append_unique('LINKFLAGS', f'/def:{hlDefNode.abspath()}')
else:
conf.fatal("Could not find hl.def")
def build(bld): def build(bld):
defines = [] defines = []
@ -61,7 +68,7 @@ def build(bld):
bld.shlib( bld.shlib(
source = source, source = source,
target = 'server', target = bld.env.SERVER_NAME,
features = 'c cxx', features = 'c cxx',
includes = includes, includes = includes,
defines = defines, defines = defines,

11
wscript

@ -40,14 +40,13 @@ def options(opt):
grp.add_option('--enable-poly-opt', action = 'store_true', dest = 'POLLY', default = False, grp.add_option('--enable-poly-opt', action = 'store_true', dest = 'POLLY', default = False,
help = 'enable polyhedral optimization if possible [default: %default]') help = 'enable polyhedral optimization if possible [default: %default]')
opt.recurse('cl_dll dlls')
opt.load('xcompile compiler_cxx compiler_c clang_compilation_database strip_on_install') opt.load('xcompile compiler_cxx compiler_c clang_compilation_database strip_on_install')
if sys.platform == 'win32': if sys.platform == 'win32':
opt.load('msvc msdev msvs') opt.load('msvc msdev msvs')
opt.load('reconfigure')
opt.load('reconfigure subproject')
opt.add_subproject(["cl_dll", "dlls"])
def configure(conf): def configure(conf):
# Configuration # Configuration
@ -220,10 +219,10 @@ def configure(conf):
conf.define('CLIENT_WEAPONS', '1') conf.define('CLIENT_WEAPONS', '1')
conf.recurse('cl_dll dlls') conf.add_subproject(["cl_dll", "dlls"])
def build(bld): def build(bld):
bld.recurse('cl_dll dlls') bld.add_subproject(["cl_dll", "dlls"])

Loading…
Cancel
Save