Skip to content
Permalink
Browse files
Fix for latest AMBuild API.
  • Loading branch information
dvander committed Aug 25, 2020
1 parent 26aa51c commit a4aafd76254c8ff3fd54756435226f1782daa5e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
@@ -433,18 +433,18 @@ class MMSConfig(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.postlink += [os.path.join(lib_folder, 'tier1.a')]
else:
compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'tier1_i486.a'))]
compiler.postlink += [os.path.join(lib_folder, 'tier1_i486.a')]

if sdk.name in ['blade', 'insurgency', 'doi', 'csgo', 'dota']:
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')]

if sdk.name == 'bms':
compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'mathlib.a'))]
compiler.postlink += [os.path.join(lib_folder, 'mathlib.a')]

binary = self.Library(compiler, name)
compiler = binary.compiler
@@ -474,20 +474,17 @@ class MMSConfig(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'
binary.compiler.linkflags.append(binary.Dep(lib_path))
binary.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
context.AddFolder(binary.localFolder)
output = context.AddSymlink(source_path, output_path)

linker = make_linker(source_path, output_path)
binary.compiler.linkflags[0:0] = [binary.Dep(library, linker)]
binary.compiler.weaklinkdeps += [output]
binary.compiler.linkflags[0:0] = [library]

return binary

@@ -35,7 +35,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

0 comments on commit a4aafd7

Please sign in to comment.