Remove use of the Dep API.
This is going away.
This commit is contained in:
parent
0bed34e0c7
commit
6e2c5a66b3
@ -506,7 +506,7 @@ class SMConfig(object):
|
||||
self.ConfigureForExtension(context, binary.compiler)
|
||||
return binary
|
||||
|
||||
def ConfigureForHL2(self, binary, sdk):
|
||||
def ConfigureForHL2(self, context, binary, sdk):
|
||||
compiler = binary.compiler
|
||||
SetArchFlags(compiler)
|
||||
|
||||
@ -594,20 +594,20 @@ class SMConfig(object):
|
||||
if compiler.target.platform in ['linux', 'mac']:
|
||||
if sdk.name in ['sdk2013', 'bms'] or compiler.target.arch == 'x86_64':
|
||||
compiler.postlink += [
|
||||
compiler.Dep(os.path.join(lib_folder, 'tier1.a')),
|
||||
compiler.Dep(os.path.join(lib_folder, 'mathlib.a'))
|
||||
os.path.join(lib_folder, 'tier1.a'),
|
||||
os.path.join(lib_folder, 'mathlib.a')
|
||||
]
|
||||
else:
|
||||
compiler.postlink += [
|
||||
compiler.Dep(os.path.join(lib_folder, 'tier1_i486.a')),
|
||||
compiler.Dep(os.path.join(lib_folder, 'mathlib_i486.a'))
|
||||
os.path.join(lib_folder, 'tier1_i486.a'),
|
||||
os.path.join(lib_folder, 'mathlib_i486.a')
|
||||
]
|
||||
|
||||
if sdk.name in ['blade', 'insurgency', 'doi', 'csgo']:
|
||||
if compiler.target.arch == 'x86_64':
|
||||
compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'interfaces.a'))]
|
||||
compiler.postlink += [os.path.join(lib_folder, 'interfaces.a')]
|
||||
else:
|
||||
compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'interfaces_i486.a'))]
|
||||
compiler.postlink += [os.path.join(lib_folder, 'interfaces_i486.a')]
|
||||
|
||||
dynamic_libs = []
|
||||
if compiler.target.platform == 'linux':
|
||||
@ -631,39 +631,37 @@ class SMConfig(object):
|
||||
lib_path = os.path.join(sdk.path, 'lib', 'public', lib) + '.lib'
|
||||
elif compiler.target.arch == 'x86_64':
|
||||
lib_path = os.path.join(sdk.path, 'lib', 'public', 'win64', lib) + '.lib'
|
||||
compiler.linkflags.append(compiler.Dep(lib_path))
|
||||
compiler.linkflags.append(lib_path)
|
||||
|
||||
for library in dynamic_libs:
|
||||
source_path = os.path.join(lib_folder, library)
|
||||
output_path = os.path.join(binary.localFolder, library)
|
||||
|
||||
def make_linker(source_path, output_path):
|
||||
def link(context, binary):
|
||||
cmd_node, (output,) = context.AddSymlink(source_path, output_path)
|
||||
return output
|
||||
return link
|
||||
# Ensure the output path exists.
|
||||
context.AddFolder(binary.localFolder)
|
||||
output = context.AddSymlink(source_path, output_path)
|
||||
|
||||
linker = make_linker(source_path, output_path)
|
||||
compiler.linkflags[0:0] = [compiler.Dep(library, linker)]
|
||||
compiler.weaklinkdeps += [output]
|
||||
compiler.linkflags[0:0] = [library]
|
||||
|
||||
return binary
|
||||
|
||||
def HL2Library(self, context, compiler, name, sdk):
|
||||
binary = self.Library(context, compiler, name)
|
||||
self.ConfigureForExtension(context, binary.compiler)
|
||||
return self.ConfigureForHL2(binary, sdk)
|
||||
return self.ConfigureForHL2(context, binary, sdk)
|
||||
|
||||
def HL2Config(self, project, compiler, name, sdk):
|
||||
def HL2Config(self, project, context, compiler, name, sdk):
|
||||
binary = project.Configure(compiler, name,
|
||||
'{0} - {1} {2}'.format(self.tag, sdk.name, compiler.target.arch))
|
||||
self.AddVersioning(binary)
|
||||
return self.ConfigureForHL2(binary, sdk)
|
||||
return self.ConfigureForHL2(context, binary, sdk)
|
||||
|
||||
def HL2ExtConfig(self, project, context, compiler, name, sdk):
|
||||
binary = project.Configure(compiler, name,
|
||||
'{0} - {1} {2}'.format(self.tag, sdk.name, compiler.target.arch))
|
||||
self.AddVersioning(binary)
|
||||
self.ConfigureForHL2(binary, sdk)
|
||||
self.ConfigureForHL2(context, binary, sdk)
|
||||
self.ConfigureForExtension(context, binary.compiler)
|
||||
return binary
|
||||
|
||||
|
@ -51,7 +51,7 @@ for sdk_name in SM.sdks:
|
||||
|
||||
binary_name = 'sourcemod.' + sdk.ext
|
||||
|
||||
binary = SM.HL2Config(project, cxx, binary_name, sdk)
|
||||
binary = SM.HL2Config(project, builder, cxx, binary_name, sdk)
|
||||
SM.ConfigureForExtension(builder, binary.compiler)
|
||||
|
||||
compiler = binary.compiler
|
||||
@ -103,7 +103,7 @@ for sdk_name in SM.sdks:
|
||||
lib_path = os.path.join(sdk.path, 'lib', 'win32', 'debug', 'vs' + vs_year, 'libprotobuf.lib')
|
||||
else:
|
||||
lib_path = os.path.join(sdk.path, 'lib', 'win32', 'release', 'vs' + vs_year, 'libprotobuf.lib')
|
||||
compiler.linkflags.insert(0, binary.Dep(lib_path))
|
||||
compiler.linkflags.insert(0, lib_path)
|
||||
|
||||
if sdk.name in ['csgo', 'blade']:
|
||||
binary.sources += ['smn_protobuf.cpp']
|
||||
|
@ -27,7 +27,7 @@ for cxx in builder.targets:
|
||||
path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_darwin', 'libpcre.a')
|
||||
elif arch == 'x86_64':
|
||||
path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_darwin64', 'libpcre.a')
|
||||
binary.compiler.postlink += [binary.Dep(path)]
|
||||
binary.compiler.postlink += [path]
|
||||
|
||||
binary.sources += [
|
||||
'extension.cpp',
|
||||
|
@ -47,7 +47,7 @@ def build_plugin(script_path, smx_file):
|
||||
smx_file
|
||||
]
|
||||
argv = spcomp_argv + [script_path]
|
||||
cmd_entry, (smx_entry,) = builder.AddCommand(
|
||||
(smx_entry,) = builder.AddCommand(
|
||||
inputs = inputs,
|
||||
argv = argv,
|
||||
outputs = outputs,
|
||||
|
@ -36,7 +36,7 @@ sources = [
|
||||
# The script source is a dependency, of course...
|
||||
argv[1]
|
||||
]
|
||||
cmd_node, output_nodes = builder.AddCommand(
|
||||
output_nodes = builder.AddCommand(
|
||||
inputs=sources,
|
||||
argv=argv,
|
||||
outputs=outputs
|
||||
|
Loading…
Reference in New Issue
Block a user