mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2024-11-28 10:24:20 +01:00
Upgrade to AMBuild 2.2.
This commit is contained in:
parent
3c5f0ca282
commit
acea12f29b
39
.travis.yml
39
.travis.yml
@ -36,12 +36,6 @@ addons:
|
|||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- ../mysql-5.0
|
- ../mysql-5.0
|
||||||
env:
|
|
||||||
- MATRIX_EVAL="CC=clang-3.9 && CXX=clang++-3.9"
|
|
||||||
- MATRIX_EVAL="CC=gcc-4.8 && CXX=g++-4.8"
|
|
||||||
- MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
|
|
||||||
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
|
|
||||||
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
|
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
@ -62,24 +56,6 @@ matrix:
|
|||||||
packages: ['clang-3.8', 'lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev', 'g++-multilib']
|
packages: ['clang-3.8', 'lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev', 'g++-multilib']
|
||||||
env: ['MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"']
|
env: ['MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"']
|
||||||
|
|
||||||
- os: linux
|
|
||||||
sudo: false
|
|
||||||
language: cpp
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
sources: ['llvm-toolchain-trusty-4.0']
|
|
||||||
packages: ['clang-4.0', 'lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev', 'g++-multilib']
|
|
||||||
env: ['MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0"']
|
|
||||||
|
|
||||||
- os: linux
|
|
||||||
sudo: false
|
|
||||||
language: cpp
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
sources: ['llvm-toolchain-trusty-5.0']
|
|
||||||
packages: ['clang-5.0', 'lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev', 'g++-multilib']
|
|
||||||
env: ['MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"']
|
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
sudo: false
|
sudo: false
|
||||||
language: cpp
|
language: cpp
|
||||||
@ -89,15 +65,6 @@ matrix:
|
|||||||
packages: ['g++-6', 'g++-6-multilib', 'lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev', 'g++-multilib']
|
packages: ['g++-6', 'g++-6-multilib', 'lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev', 'g++-multilib']
|
||||||
env: ['MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"']
|
env: ['MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"']
|
||||||
|
|
||||||
allow_failures:
|
|
||||||
- env: MATRIX_EVAL="CC=clang-3.7 && CXX=clang++-3.7"
|
|
||||||
- env: MATRIX_EVAL="CC=clang-3.9 && CXX=clang++-3.9"
|
|
||||||
- env: MATRIX_EVAL="CC=gcc-4.8 && CXX=g++-4.8"
|
|
||||||
- env: MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
|
|
||||||
- env: MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
|
|
||||||
- env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
|
|
||||||
|
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- CHECKOUT_DIR=$PWD && cd .. && $CHECKOUT_DIR/support/checkout-deps.sh && cd $CHECKOUT_DIR
|
- CHECKOUT_DIR=$PWD && cd .. && $CHECKOUT_DIR/support/checkout-deps.sh && cd $CHECKOUT_DIR
|
||||||
script:
|
script:
|
||||||
@ -109,8 +76,10 @@ script:
|
|||||||
- cd .. && mkdir build-sh-opt && cd build-sh-opt
|
- cd .. && mkdir build-sh-opt && cd build-sh-opt
|
||||||
- python ../configure.py --enable-optimize --enable-tests --sdks=
|
- python ../configure.py --enable-optimize --enable-tests --sdks=
|
||||||
- ambuild
|
- ambuild
|
||||||
- ./core/sourcehook/test/test_sourcehook/test_sourcehook -v
|
- ./core/sourcehook/test/test_sourcehook/linux-x86/test_sourcehook -v
|
||||||
|
- ./core/sourcehook/test/test_sourcehook/linux-x86_64/test_sourcehook -v
|
||||||
- cd .. && mkdir build-sh-debug && cd build-sh-debug
|
- cd .. && mkdir build-sh-debug && cd build-sh-debug
|
||||||
- python ../configure.py --enable-debug --enable-tests --sdks=
|
- python ../configure.py --enable-debug --enable-tests --sdks=
|
||||||
- ambuild
|
- ambuild
|
||||||
- ./core/sourcehook/test/test_sourcehook/test_sourcehook -v
|
- ./core/sourcehook/test/test_sourcehook/linux-x86/test_sourcehook -v
|
||||||
|
- ./core/sourcehook/test/test_sourcehook/linux-x86_64/test_sourcehook -v
|
||||||
|
194
AMBuildScript
194
AMBuildScript
@ -18,24 +18,24 @@ class SDK(object):
|
|||||||
else:
|
else:
|
||||||
self.platformSpec = platform
|
self.platformSpec = platform
|
||||||
|
|
||||||
def shouldBuild(self, target, archs):
|
def shouldBuild(self, targets):
|
||||||
if target.platform not in self.platformSpec:
|
for cxx in targets:
|
||||||
return False
|
if cxx.target.platform in self.platformSpec:
|
||||||
if not len([i for i in self.platformSpec[target.platform] if i in archs]):
|
if cxx.target.arch in self.platformSpec[cxx.target.platform]:
|
||||||
return False
|
return True
|
||||||
return True
|
return False
|
||||||
|
|
||||||
WinOnly = ['windows']
|
WinOnly = ['windows']
|
||||||
WinLinux = ['windows', 'linux']
|
WinLinux = ['windows', 'linux']
|
||||||
WinLinuxMac = ['windows', 'linux', 'mac']
|
WinLinuxMac = ['windows', 'linux', 'mac']
|
||||||
CSGO = {
|
CSGO = {
|
||||||
'windows': ['x86'],
|
'windows': ['x86'],
|
||||||
'linux': ['x86', 'x64'],
|
'linux': ['x86', 'x86_64'],
|
||||||
'mac': ['x64']
|
'mac': ['x86_64']
|
||||||
}
|
}
|
||||||
Source2 = {
|
Source2 = {
|
||||||
'windows': ['x86', 'x64'],
|
'windows': ['x86', 'x86_64'],
|
||||||
'linux': ['x64'],
|
'linux': ['x86_64'],
|
||||||
}
|
}
|
||||||
|
|
||||||
PossibleSDKs = {
|
PossibleSDKs = {
|
||||||
@ -78,28 +78,6 @@ def ResolveEnvPath(env, folder):
|
|||||||
oldhead = head
|
oldhead = head
|
||||||
head, tail = os.path.split(head)
|
head, tail = os.path.split(head)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def SetArchFlags(compiler, arch, platform):
|
|
||||||
if compiler.behavior == 'gcc':
|
|
||||||
if arch == 'x86':
|
|
||||||
compiler.cflags += ['-m32']
|
|
||||||
compiler.linkflags += ['-m32']
|
|
||||||
if platform == 'mac':
|
|
||||||
compiler.linkflags += ['-arch', 'i386']
|
|
||||||
elif arch == 'x64':
|
|
||||||
compiler.cflags += ['-m64', '-fPIC']
|
|
||||||
compiler.linkflags += ['-m64']
|
|
||||||
if platform == 'mac':
|
|
||||||
compiler.linkflags += ['-arch', 'x86_64']
|
|
||||||
elif compiler.like('msvc'):
|
|
||||||
if arch == 'x86':
|
|
||||||
compiler.linkflags += ['/MACHINE:X86']
|
|
||||||
elif arch == 'x64':
|
|
||||||
compiler.linkflags += ['/MACHINE:X64']
|
|
||||||
|
|
||||||
def AppendArchSuffix(binary, name, arch):
|
|
||||||
if arch == 'x64':
|
|
||||||
binary.localFolder = name + '.x64'
|
|
||||||
|
|
||||||
class MMSConfig(object):
|
class MMSConfig(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -107,7 +85,30 @@ class MMSConfig(object):
|
|||||||
self.binaries = []
|
self.binaries = []
|
||||||
self.generated_headers = None
|
self.generated_headers = None
|
||||||
self.versionlib = None
|
self.versionlib = None
|
||||||
self.archs = builder.target.arch.replace('x86_64', 'x64').split(',')
|
self.all_targets = []
|
||||||
|
self.target_archs = set()
|
||||||
|
|
||||||
|
if builder.options.targets:
|
||||||
|
target_archs = builder.options.targets.split(',')
|
||||||
|
else:
|
||||||
|
target_archs = ['x86']
|
||||||
|
if builder.backend == 'amb2':
|
||||||
|
target_archs.append('x86_64')
|
||||||
|
|
||||||
|
for arch in target_archs:
|
||||||
|
try:
|
||||||
|
cxx = builder.DetectCxx(target_arch = arch)
|
||||||
|
self.target_archs.add(cxx.target.arch)
|
||||||
|
except Exception as e:
|
||||||
|
# Error if archs were manually overridden.
|
||||||
|
if builder.options.targets:
|
||||||
|
raise
|
||||||
|
print('Skipping target {}: {}'.format(arch, e))
|
||||||
|
continue
|
||||||
|
self.all_targets.append(cxx)
|
||||||
|
|
||||||
|
if not self.all_targets:
|
||||||
|
raise Exception('No suitable C/C++ compiler was found.')
|
||||||
|
|
||||||
def use_auto_versioning(self):
|
def use_auto_versioning(self):
|
||||||
if builder.backend != 'amb2':
|
if builder.backend != 'amb2':
|
||||||
@ -135,9 +136,10 @@ class MMSConfig(object):
|
|||||||
if sdk_list[0] == '':
|
if sdk_list[0] == '':
|
||||||
sdk_list = []
|
sdk_list = []
|
||||||
|
|
||||||
|
not_found = []
|
||||||
for sdk_name in PossibleSDKs:
|
for sdk_name in PossibleSDKs:
|
||||||
sdk = PossibleSDKs[sdk_name]
|
sdk = PossibleSDKs[sdk_name]
|
||||||
if sdk.shouldBuild(builder.target, self.archs):
|
if sdk.shouldBuild(self.all_targets):
|
||||||
if builder.options.hl2sdk_root:
|
if builder.options.hl2sdk_root:
|
||||||
sdk_path = os.path.join(builder.options.hl2sdk_root, sdk.folder)
|
sdk_path = os.path.join(builder.options.hl2sdk_root, sdk.folder)
|
||||||
else:
|
else:
|
||||||
@ -145,26 +147,29 @@ class MMSConfig(object):
|
|||||||
if sdk_path is None:
|
if sdk_path is None:
|
||||||
if use_all or sdk_name in sdk_list:
|
if use_all or sdk_name in sdk_list:
|
||||||
raise Exception('Could not find a valid path for {0}'.format(sdk.envvar))
|
raise Exception('Could not find a valid path for {0}'.format(sdk.envvar))
|
||||||
|
not_found.append(sdk_name)
|
||||||
continue
|
continue
|
||||||
if use_all or use_present or sdk_name in sdk_list:
|
if use_all or use_present or sdk_name in sdk_list:
|
||||||
sdk.path = sdk_path
|
sdk.path = sdk_path
|
||||||
self.sdks[sdk_name] = sdk
|
self.sdks[sdk_name] = sdk
|
||||||
|
|
||||||
if len(self.sdks) < 1 and len(sdk_list):
|
if len(self.sdks) < 1 and len(sdk_list):
|
||||||
raise Exception('No SDKs were found that build on {0}-{1}, nothing to do.'.format(
|
raise Exception('No SDKs were found, nothing to build.')
|
||||||
builder.target.platform, builder.target.arch))
|
|
||||||
|
if use_present:
|
||||||
|
for sdk in not_found:
|
||||||
|
print('Warning: hl2sdk-{} was not found, and will not be included in build.'.format(sdk))
|
||||||
|
|
||||||
def configure(self):
|
def configure(self):
|
||||||
builder.AddConfigureFile('pushbuild.txt')
|
builder.AddConfigureFile('pushbuild.txt')
|
||||||
|
|
||||||
if not set(self.archs).issubset(['x86', 'x64']):
|
for cxx in self.all_targets:
|
||||||
raise Exception('Unknown target architecture: {0}'.format(builder.target.arch))
|
if cxx.target.arch not in ['x86', 'x86_64']:
|
||||||
|
raise Exception('Unknown target architecture: {0}'.format(arch))
|
||||||
|
|
||||||
cxx = builder.DetectCxx()
|
self.configure_cxx(cxx)
|
||||||
|
|
||||||
if cxx.like('msvc') and len(self.archs) > 1:
|
|
||||||
raise Exception('Building multiple archs with MSVC is not currently supported')
|
|
||||||
|
|
||||||
|
def configure_cxx(self, cxx):
|
||||||
if cxx.behavior == 'gcc':
|
if cxx.behavior == 'gcc':
|
||||||
cxx.defines += [
|
cxx.defines += [
|
||||||
'stricmp=strcasecmp',
|
'stricmp=strcasecmp',
|
||||||
@ -183,6 +188,7 @@ class MMSConfig(object):
|
|||||||
'-Wno-unused',
|
'-Wno-unused',
|
||||||
'-Wno-switch',
|
'-Wno-switch',
|
||||||
'-msse',
|
'-msse',
|
||||||
|
'-fPIC',
|
||||||
]
|
]
|
||||||
|
|
||||||
cxx.cxxflags += [ '-std=c++11' ]
|
cxx.cxxflags += [ '-std=c++11' ]
|
||||||
@ -267,13 +273,13 @@ class MMSConfig(object):
|
|||||||
cxx.cflags += ['/Oy-']
|
cxx.cflags += ['/Oy-']
|
||||||
|
|
||||||
# Platform-specifics
|
# Platform-specifics
|
||||||
if builder.target.platform == 'linux':
|
if cxx.target.platform == 'linux':
|
||||||
cxx.defines += ['_LINUX', 'POSIX', '_FILE_OFFSET_BITS=64']
|
cxx.defines += ['_LINUX', 'POSIX', '_FILE_OFFSET_BITS=64']
|
||||||
if cxx.family == 'gcc':
|
if cxx.family == 'gcc':
|
||||||
cxx.linkflags += ['-static-libgcc']
|
cxx.linkflags += ['-static-libgcc']
|
||||||
elif cxx.family == 'clang':
|
elif cxx.family == 'clang':
|
||||||
cxx.linkflags += ['-lgcc_eh']
|
cxx.linkflags += ['-lgcc_eh']
|
||||||
elif builder.target.platform == 'mac':
|
elif cxx.target.platform == 'mac':
|
||||||
cxx.defines += ['OSX', '_OSX', 'POSIX']
|
cxx.defines += ['OSX', '_OSX', 'POSIX']
|
||||||
|
|
||||||
if cxx.version >= 'apple-clang-10.0':
|
if cxx.version >= 'apple-clang-10.0':
|
||||||
@ -290,7 +296,7 @@ class MMSConfig(object):
|
|||||||
cxx.linkflags += [
|
cxx.linkflags += [
|
||||||
'-lc++',
|
'-lc++',
|
||||||
]
|
]
|
||||||
elif builder.target.platform == 'windows':
|
elif cxx.target.platform == 'windows':
|
||||||
cxx.defines += ['WIN32', '_WINDOWS']
|
cxx.defines += ['WIN32', '_WINDOWS']
|
||||||
|
|
||||||
# Finish up.
|
# Finish up.
|
||||||
@ -305,8 +311,8 @@ class MMSConfig(object):
|
|||||||
os.path.join(builder.sourcePath, 'versionlib'),
|
os.path.join(builder.sourcePath, 'versionlib'),
|
||||||
]
|
]
|
||||||
|
|
||||||
def HL2Compiler(self, context, sdk, arch):
|
def HL2Compiler(self, context, cxx, sdk):
|
||||||
compiler = context.cxx.clone()
|
compiler = cxx.clone()
|
||||||
compiler.cxxincludes += [
|
compiler.cxxincludes += [
|
||||||
os.path.join(context.currentSourcePath),
|
os.path.join(context.currentSourcePath),
|
||||||
os.path.join(context.currentSourcePath, 'sourcehook'),
|
os.path.join(context.currentSourcePath, 'sourcehook'),
|
||||||
@ -339,9 +345,9 @@ class MMSConfig(object):
|
|||||||
|
|
||||||
if compiler.family == 'msvc':
|
if compiler.family == 'msvc':
|
||||||
compiler.defines += ['COMPILER_MSVC']
|
compiler.defines += ['COMPILER_MSVC']
|
||||||
if arch == 'x86':
|
if compiler.target.arch == 'x86':
|
||||||
compiler.defines += ['COMPILER_MSVC32']
|
compiler.defines += ['COMPILER_MSVC32']
|
||||||
elif arch == 'x64':
|
elif compiler.target.arch == 'x86_64':
|
||||||
compiler.defines += ['COMPILER_MSVC64']
|
compiler.defines += ['COMPILER_MSVC64']
|
||||||
|
|
||||||
if compiler.version >= 1900:
|
if compiler.version >= 1900:
|
||||||
@ -349,14 +355,14 @@ class MMSConfig(object):
|
|||||||
else:
|
else:
|
||||||
compiler.defines += ['COMPILER_GCC']
|
compiler.defines += ['COMPILER_GCC']
|
||||||
|
|
||||||
if arch == 'x64':
|
if compiler.target.arch == 'x86_64':
|
||||||
compiler.defines += ['X64BITS', 'PLATFORM_64BITS']
|
compiler.defines += ['X64BITS', 'PLATFORM_64BITS']
|
||||||
|
|
||||||
if sdk.name in ['css', 'hl2dm', 'dods', 'sdk2013', 'bms', 'tf2', 'l4d', 'nucleardawn', 'l4d2', 'dota']:
|
if sdk.name in ['css', 'hl2dm', 'dods', 'sdk2013', 'bms', 'tf2', 'l4d', 'nucleardawn', 'l4d2', 'dota']:
|
||||||
if builder.target.platform in ['linux', 'mac']:
|
if compiler.target.platform in ['linux', 'mac']:
|
||||||
compiler.defines += ['NO_HOOK_MALLOC', 'NO_MALLOC_OVERRIDE']
|
compiler.defines += ['NO_HOOK_MALLOC', 'NO_MALLOC_OVERRIDE']
|
||||||
|
|
||||||
if sdk.name in ['csgo', 'blade'] and builder.target.platform == 'linux':
|
if sdk.name in ['csgo', 'blade'] and compiler.target.platform == 'linux':
|
||||||
compiler.linkflags += ['-lstdc++']
|
compiler.linkflags += ['-lstdc++']
|
||||||
|
|
||||||
|
|
||||||
@ -365,35 +371,35 @@ class MMSConfig(object):
|
|||||||
|
|
||||||
return compiler
|
return compiler
|
||||||
|
|
||||||
def AddVersioning(self, binary, arch):
|
def AddVersioning(self, binary):
|
||||||
if builder.target.platform == 'windows':
|
if binary.compiler.target.platform == 'windows':
|
||||||
binary.sources += ['version.rc']
|
binary.sources += ['version.rc']
|
||||||
binary.compiler.rcdefines += [
|
binary.compiler.rcdefines += [
|
||||||
'BINARY_NAME="{0}"'.format(binary.outputFile),
|
'BINARY_NAME="{0}"'.format(binary.outputFile),
|
||||||
'RC_COMPILE'
|
'RC_COMPILE'
|
||||||
]
|
]
|
||||||
elif builder.target.platform == 'mac' and binary.type == 'library':
|
elif binary.compiler.target.platform == 'mac' and binary.type == 'library':
|
||||||
binary.compiler.postlink += [
|
binary.compiler.postlink += [
|
||||||
'-compatibility_version', '1.0.0',
|
'-compatibility_version', '1.0.0',
|
||||||
'-current_version', self.productVersion
|
'-current_version', self.productVersion
|
||||||
]
|
]
|
||||||
if self.use_auto_versioning():
|
if self.use_auto_versioning():
|
||||||
binary.compiler.linkflags += [self.versionlib[arch]]
|
binary.compiler.linkflags += [self.versionlib[binary.compiler.target.arch]]
|
||||||
binary.compiler.sourcedeps += MMS.generated_headers
|
binary.compiler.sourcedeps += MMS.generated_headers
|
||||||
if builder.options.breakpad_dump:
|
if builder.options.breakpad_dump:
|
||||||
binary.compiler.symbol_files = 'separate'
|
binary.compiler.symbol_files = 'separate'
|
||||||
return binary
|
return binary
|
||||||
|
|
||||||
def LibraryBuilder(self, compiler, name, arch):
|
def Library(self, cxx, name):
|
||||||
binary = compiler.Library(name)
|
binary = cxx.Library(name)
|
||||||
AppendArchSuffix(binary, name, arch)
|
self.AddVersioning(binary)
|
||||||
self.AddVersioning(binary, arch)
|
|
||||||
return binary
|
return binary
|
||||||
|
|
||||||
def ProgramBuilder(self, compiler, name, arch):
|
def Program(self, compiler, name):
|
||||||
binary = compiler.Program(name)
|
binary = compiler.Program(name)
|
||||||
AppendArchSuffix(binary, name, arch)
|
compiler = binary.compiler
|
||||||
self.AddVersioning(binary, arch)
|
|
||||||
|
self.AddVersioning(binary)
|
||||||
if '-static-libgcc' in binary.compiler.linkflags:
|
if '-static-libgcc' in binary.compiler.linkflags:
|
||||||
binary.compiler.linkflags.remove('-static-libgcc')
|
binary.compiler.linkflags.remove('-static-libgcc')
|
||||||
if '-lgcc_eh' in binary.compiler.linkflags:
|
if '-lgcc_eh' in binary.compiler.linkflags:
|
||||||
@ -402,56 +408,37 @@ class MMSConfig(object):
|
|||||||
binary.compiler.linkflags += ['-lstdc++']
|
binary.compiler.linkflags += ['-lstdc++']
|
||||||
return binary
|
return binary
|
||||||
|
|
||||||
def StaticLibraryBuilder(self, compiler, name, arch):
|
def StaticLibrary(self, cxx, name):
|
||||||
binary = compiler.StaticLibrary(name)
|
return cxx.StaticLibrary(name)
|
||||||
AppendArchSuffix(binary, name, arch)
|
|
||||||
return binary;
|
|
||||||
|
|
||||||
def Library(self, context, name, arch):
|
def HL2Library(self, context, compiler, name, sdk):
|
||||||
compiler = context.cxx.clone()
|
compiler = self.HL2Compiler(context, compiler, sdk)
|
||||||
SetArchFlags(compiler, arch, builder.target.platform)
|
|
||||||
return self.LibraryBuilder(compiler, name, arch)
|
|
||||||
|
|
||||||
def Program(self, context, name, arch):
|
|
||||||
compiler = context.cxx.clone()
|
|
||||||
SetArchFlags(compiler, arch, builder.target.platform)
|
|
||||||
return self.ProgramBuilder(compiler, name, arch)
|
|
||||||
|
|
||||||
def StaticLibrary(self, context, name, arch):
|
if compiler.target.platform == 'linux':
|
||||||
compiler = context.cxx.clone()
|
|
||||||
SetArchFlags(compiler, arch, builder.target.platform)
|
|
||||||
return self.StaticLibraryBuilder(compiler, name, arch)
|
|
||||||
|
|
||||||
def HL2Library(self, context, name, sdk, arch):
|
|
||||||
compiler = self.HL2Compiler(context, sdk, arch)
|
|
||||||
|
|
||||||
SetArchFlags(compiler, arch, builder.target.platform)
|
|
||||||
|
|
||||||
if builder.target.platform == 'linux':
|
|
||||||
if sdk.name == 'episode1':
|
if sdk.name == 'episode1':
|
||||||
lib_folder = os.path.join(sdk.path, 'linux_sdk')
|
lib_folder = os.path.join(sdk.path, 'linux_sdk')
|
||||||
elif sdk.name in ['sdk2013', 'bms']:
|
elif sdk.name in ['sdk2013', 'bms']:
|
||||||
lib_folder = os.path.join(sdk.path, 'lib', 'public', 'linux32')
|
lib_folder = os.path.join(sdk.path, 'lib', 'public', 'linux32')
|
||||||
elif arch == 'x64':
|
elif compiler.target.arch == 'x86_64':
|
||||||
lib_folder = os.path.join(sdk.path, 'lib', 'linux64')
|
lib_folder = os.path.join(sdk.path, 'lib', 'linux64')
|
||||||
else:
|
else:
|
||||||
lib_folder = os.path.join(sdk.path, 'lib', 'linux')
|
lib_folder = os.path.join(sdk.path, 'lib', 'linux')
|
||||||
elif builder.target.platform == 'mac':
|
elif compiler.target.platform == 'mac':
|
||||||
if sdk.name in ['sdk2013', 'bms']:
|
if sdk.name in ['sdk2013', 'bms']:
|
||||||
lib_folder = os.path.join(sdk.path, 'lib', 'public', 'osx32')
|
lib_folder = os.path.join(sdk.path, 'lib', 'public', 'osx32')
|
||||||
elif arch == 'x64':
|
elif arch == 'x86_64':
|
||||||
lib_folder = os.path.join(sdk.path, 'lib', 'osx64')
|
lib_folder = os.path.join(sdk.path, 'lib', 'osx64')
|
||||||
else:
|
else:
|
||||||
lib_folder = os.path.join(sdk.path, 'lib', 'mac')
|
lib_folder = os.path.join(sdk.path, 'lib', 'mac')
|
||||||
|
|
||||||
if builder.target.platform in ['linux', 'mac']:
|
if compiler.target.platform in ['linux', 'mac']:
|
||||||
if sdk.name in ['sdk2013', 'bms'] or arch == 'x64':
|
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 += [compiler.Dep(os.path.join(lib_folder, 'tier1.a'))]
|
||||||
else:
|
else:
|
||||||
compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'tier1_i486.a'))]
|
compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'tier1_i486.a'))]
|
||||||
|
|
||||||
if sdk.name in ['blade', 'insurgency', 'doi', 'csgo', 'dota']:
|
if sdk.name in ['blade', 'insurgency', 'doi', 'csgo', 'dota']:
|
||||||
if arch == 'x64':
|
if compiler.target.arch == 'x86_64':
|
||||||
compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'interfaces.a'))]
|
compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'interfaces.a'))]
|
||||||
else:
|
else:
|
||||||
compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'interfaces_i486.a'))]
|
compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'interfaces_i486.a'))]
|
||||||
@ -459,32 +446,33 @@ class MMSConfig(object):
|
|||||||
if sdk.name == 'bms':
|
if sdk.name == 'bms':
|
||||||
compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'mathlib.a'))]
|
compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'mathlib.a'))]
|
||||||
|
|
||||||
binary = self.LibraryBuilder(compiler, name, arch)
|
binary = self.Library(compiler, name)
|
||||||
|
compiler = binary.compiler
|
||||||
|
|
||||||
dynamic_libs = []
|
dynamic_libs = []
|
||||||
if builder.target.platform == 'linux':
|
if compiler.target.platform == 'linux':
|
||||||
compiler.linkflags[0:0] = ['-lm']
|
compiler.linkflags[0:0] = ['-lm']
|
||||||
if sdk.name in ['css', 'hl2dm', 'dods', 'tf2', 'sdk2013', 'bms', 'nucleardawn', 'l4d2', 'insurgency', 'doi']:
|
if sdk.name in ['css', 'hl2dm', 'dods', 'tf2', 'sdk2013', 'bms', 'nucleardawn', 'l4d2', 'insurgency', 'doi']:
|
||||||
dynamic_libs = ['libtier0_srv.so', 'libvstdlib_srv.so']
|
dynamic_libs = ['libtier0_srv.so', 'libvstdlib_srv.so']
|
||||||
elif arch == 'x64' and sdk.name in ['csgo', 'blade']:
|
elif compiler.target.arch == 'x86_64' and sdk.name in ['csgo', 'blade']:
|
||||||
dynamic_libs = ['libtier0_client.so', 'libvstdlib_client.so']
|
dynamic_libs = ['libtier0_client.so', 'libvstdlib_client.so']
|
||||||
elif sdk.name in ['l4d', 'blade', 'insurgency', 'doi', 'csgo', 'dota']:
|
elif sdk.name in ['l4d', 'blade', 'insurgency', 'doi', 'csgo', 'dota']:
|
||||||
dynamic_libs = ['libtier0.so', 'libvstdlib.so']
|
dynamic_libs = ['libtier0.so', 'libvstdlib.so']
|
||||||
else:
|
else:
|
||||||
dynamic_libs = ['tier0_i486.so', 'vstdlib_i486.so']
|
dynamic_libs = ['tier0_i486.so', 'vstdlib_i486.so']
|
||||||
elif builder.target.platform == 'mac':
|
elif compiler.target.platform == 'mac':
|
||||||
binary.compiler.linkflags.append('-liconv')
|
binary.compiler.linkflags.append('-liconv')
|
||||||
dynamic_libs = ['libtier0.dylib', 'libvstdlib.dylib']
|
dynamic_libs = ['libtier0.dylib', 'libvstdlib.dylib']
|
||||||
elif builder.target.platform == 'windows':
|
elif compiler.target.platform == 'windows':
|
||||||
libs = ['tier0', 'tier1', 'vstdlib']
|
libs = ['tier0', 'tier1', 'vstdlib']
|
||||||
if sdk.name in ['swarm', 'blade', 'insurgency', 'doi', 'csgo', 'dota']:
|
if sdk.name in ['swarm', 'blade', 'insurgency', 'doi', 'csgo', 'dota']:
|
||||||
libs.append('interfaces')
|
libs.append('interfaces')
|
||||||
if sdk.name == 'bms':
|
if sdk.name == 'bms':
|
||||||
libs.append('mathlib')
|
libs.append('mathlib')
|
||||||
for lib in libs:
|
for lib in libs:
|
||||||
if arch == 'x86':
|
if compiler.target.arch == 'x86':
|
||||||
lib_path = os.path.join(sdk.path, 'lib', 'public', lib) + '.lib'
|
lib_path = os.path.join(sdk.path, 'lib', 'public', lib) + '.lib'
|
||||||
elif arch == 'x64':
|
elif compiler.target.arch == 'x86_64':
|
||||||
lib_path = os.path.join(sdk.path, 'lib', 'public', 'win64', lib) + '.lib'
|
lib_path = os.path.join(sdk.path, 'lib', 'public', 'win64', lib) + '.lib'
|
||||||
binary.compiler.linkflags.append(binary.Dep(lib_path))
|
binary.compiler.linkflags.append(binary.Dep(lib_path))
|
||||||
|
|
||||||
@ -503,6 +491,12 @@ class MMSConfig(object):
|
|||||||
|
|
||||||
return binary
|
return binary
|
||||||
|
|
||||||
|
if getattr(builder, 'target', None) is not None:
|
||||||
|
sys.stderr.write("Your output folder was configured for AMBuild 2.1, and Metamod:Source\n")
|
||||||
|
sys.stderr.write("is now configured to use AMBuild 2.2. Please remove your output folder\n")
|
||||||
|
sys.stderr.write("and reconfigure to continue.\n")
|
||||||
|
os._exit(1)
|
||||||
|
|
||||||
MMS = MMSConfig()
|
MMS = MMSConfig()
|
||||||
MMS.detectProductVersion()
|
MMS.detectProductVersion()
|
||||||
MMS.detectSDKs()
|
MMS.detectSDKs()
|
||||||
|
27
configure.py
27
configure.py
@ -12,23 +12,26 @@ except:
|
|||||||
sys.stderr.write('http://www.alliedmods.net/ambuild\n')
|
sys.stderr.write('http://www.alliedmods.net/ambuild\n')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
def make_objdir_name(p):
|
# Hack to show a decent upgrade message, which wasn't done until 2.2.
|
||||||
return 'obj-' + util.Platform() + '-' + p.target_arch
|
ambuild_version = getattr(run, 'CURRENT_API', '2.1')
|
||||||
|
if ambuild_version.startswith('2.1'):
|
||||||
|
sys.stderr.write("AMBuild 2.2 or higher is required; please update\n")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
parser = run.BuildParser(sourcePath=sys.path[0], api='2.1')
|
parser = run.BuildParser(sourcePath=sys.path[0], api='2.2')
|
||||||
parser.default_arch = 'x86'
|
parser.options.add_argument('--hl2sdk-root', type=str, dest='hl2sdk_root', default=None,
|
||||||
parser.default_build_folder = make_objdir_name
|
|
||||||
parser.options.add_option('--hl2sdk-root', type=str, dest='hl2sdk_root', default=None,
|
|
||||||
help='Root search folder for HL2SDKs')
|
help='Root search folder for HL2SDKs')
|
||||||
parser.options.add_option('--enable-debug', action='store_const', const='1', dest='debug',
|
parser.options.add_argument('--enable-debug', action='store_const', const='1', dest='debug',
|
||||||
help='Enable debugging symbols')
|
help='Enable debugging symbols')
|
||||||
parser.options.add_option('--enable-optimize', action='store_const', const='1', dest='opt',
|
parser.options.add_argument('--enable-optimize', action='store_const', const='1', dest='opt',
|
||||||
help='Enable optimization')
|
help='Enable optimization')
|
||||||
parser.options.add_option('-s', '--sdks', default='all', dest='sdks',
|
parser.options.add_argument('-s', '--sdks', default='present', dest='sdks',
|
||||||
help='Build against specified SDKs; valid args are "all", "present", or '
|
help='Build against specified SDKs; valid args are "all", "present", or '
|
||||||
'comma-delimited list of engine names (default: %default)')
|
'comma-delimited list of engine names')
|
||||||
parser.options.add_option('--enable-tests', default=False, dest='enable_tests', action='store_true',
|
parser.options.add_argument('--enable-tests', default=False, dest='enable_tests', action='store_true',
|
||||||
help='Build tests.')
|
help='Build tests.')
|
||||||
parser.options.add_option('--breakpad-dump', action='store_true', dest='breakpad_dump',
|
parser.options.add_argument('--breakpad-dump', action='store_true', dest='breakpad_dump',
|
||||||
default=False, help='Dump and upload breakpad symbols')
|
default=False, help='Dump and upload breakpad symbols')
|
||||||
|
parser.options.add_argument('--targets', type=str, dest='targets', default=None,
|
||||||
|
help="Override the target architecture (use commas to separate multiple targets).")
|
||||||
parser.Configure()
|
parser.Configure()
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
for sdk_name in MMS.sdks:
|
for sdk_name in MMS.sdks:
|
||||||
for arch in MMS.archs:
|
for cxx in MMS.all_targets:
|
||||||
sdk = MMS.sdks[sdk_name]
|
sdk = MMS.sdks[sdk_name]
|
||||||
|
|
||||||
if not arch in sdk.platformSpec[builder.target.platform]:
|
if not cxx.target.arch in sdk.platformSpec[cxx.target.platform]:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
name = 'metamod.' + sdk.ext
|
name = 'metamod.' + sdk.ext
|
||||||
binary = MMS.HL2Library(builder, name, sdk, arch)
|
binary = MMS.HL2Library(builder, cxx, name, sdk)
|
||||||
|
|
||||||
binary.sources += [
|
binary.sources += [
|
||||||
'metamod.cpp',
|
'metamod.cpp',
|
||||||
@ -29,7 +29,7 @@ for sdk_name in MMS.sdks:
|
|||||||
]
|
]
|
||||||
|
|
||||||
# Source2 hack. TODO: check this more deterministically, "are we doing an x64 build?"
|
# Source2 hack. TODO: check this more deterministically, "are we doing an x64 build?"
|
||||||
if arch == 'x86':
|
if binary.compiler.target.arch == 'x86':
|
||||||
binary.sources += ['sourcehook/sourcehook_hookmangen.cpp']
|
binary.sources += ['sourcehook/sourcehook_hookmangen.cpp']
|
||||||
nodes = builder.Add(binary)
|
nodes = builder.Add(binary)
|
||||||
MMS.binaries += [nodes]
|
MMS.binaries += [nodes]
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||||
import os
|
import os
|
||||||
|
|
||||||
for arch in MMS.archs:
|
for cxx in MMS.all_targets:
|
||||||
name = 'test_sourcehook'
|
name = 'test_sourcehook'
|
||||||
binary = MMS.Program(builder, name, arch)
|
binary = MMS.Program(cxx, name)
|
||||||
binary.compiler.cxxincludes += [
|
binary.compiler.cxxincludes += [
|
||||||
os.path.join(builder.sourcePath, 'core', 'sourcehook'),
|
os.path.join(builder.sourcePath, 'core', 'sourcehook'),
|
||||||
]
|
]
|
||||||
@ -36,7 +36,7 @@ for arch in MMS.archs:
|
|||||||
'testrefret.cpp',
|
'testrefret.cpp',
|
||||||
'testvphooks.cpp',
|
'testvphooks.cpp',
|
||||||
]
|
]
|
||||||
if arch == 'x86':
|
if binary.compiler.target.arch == 'x86':
|
||||||
binary.sources += ['../sourcehook_hookmangen.cpp']
|
binary.sources += ['../sourcehook_hookmangen.cpp']
|
||||||
|
|
||||||
builder.Add(binary)
|
builder.Add(binary)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
# vim: set ts=8 sts=2 sw=2 tw=99 et ft=python:
|
# vim: set ts=8 sts=2 sw=2 tw=99 et ft=python:
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
def configure_library(name, linux_defines, arch):
|
def configure_library(cxx, name, linux_defines):
|
||||||
libname = name
|
libname = name
|
||||||
binary = MMS.Library(builder, libname, arch)
|
binary = MMS.Library(cxx, libname)
|
||||||
binary.compiler.cxxincludes += [os.path.join(builder.sourcePath, 'core', 'sourcehook')]
|
binary.compiler.cxxincludes += [os.path.join(builder.sourcePath, 'core', 'sourcehook')]
|
||||||
binary.sources += [
|
binary.sources += [
|
||||||
'loader.cpp',
|
'loader.cpp',
|
||||||
@ -12,17 +12,17 @@ def configure_library(name, linux_defines, arch):
|
|||||||
'utility.cpp',
|
'utility.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
if builder.target.platform == 'linux':
|
if binary.compiler.target.platform == 'linux':
|
||||||
binary.compiler.defines += linux_defines
|
binary.compiler.defines += linux_defines
|
||||||
|
|
||||||
nodes = builder.Add(binary)
|
nodes = builder.Add(binary)
|
||||||
MMS.binaries += [nodes]
|
MMS.binaries += [nodes]
|
||||||
|
|
||||||
for arch in MMS.archs:
|
for cxx in MMS.all_targets:
|
||||||
if builder.target.platform == 'linux':
|
if cxx.target.platform == 'linux':
|
||||||
if arch == 'x64':
|
if cxx.target.arch == 'x64':
|
||||||
configure_library('libserver', ['LIB_PREFIX="lib"', 'LIB_SUFFIX=".so"'], arch)
|
configure_library(cxx, 'libserver', ['LIB_PREFIX="lib"', 'LIB_SUFFIX=".so"'])
|
||||||
elif arch == 'x86':
|
elif cxx.target.arch == 'x86':
|
||||||
configure_library('server_i486', ['LIB_PREFIX=""', 'LIB_SUFFIX="_i486.so"'], arch)
|
configure_library(cxx, 'server_i486', ['LIB_PREFIX=""', 'LIB_SUFFIX="_i486.so"'])
|
||||||
|
|
||||||
configure_library('server', ['LIB_PREFIX="lib"', 'LIB_SUFFIX=".so"'], arch)
|
configure_library(cxx, 'server', ['LIB_PREFIX="lib"', 'LIB_SUFFIX=".so"'])
|
||||||
|
@ -7,17 +7,17 @@ addons_folder = builder.AddFolder('addons')
|
|||||||
metamod_folder = builder.AddFolder(os.path.join('addons', 'metamod'))
|
metamod_folder = builder.AddFolder(os.path.join('addons', 'metamod'))
|
||||||
bin_folder = builder.AddFolder(os.path.join('addons', 'metamod', 'bin'))
|
bin_folder = builder.AddFolder(os.path.join('addons', 'metamod', 'bin'))
|
||||||
|
|
||||||
for arch in MMS.archs:
|
for cxx in MMS.all_targets:
|
||||||
if arch == 'x64':
|
if cxx.target.arch == 'x86_64':
|
||||||
if builder.target.platform == 'windows':
|
if cxx.target.platform == 'windows':
|
||||||
bin64_folder = builder.AddFolder(os.path.join('addons', 'metamod', 'bin', 'win64'))
|
bin64_folder = builder.AddFolder(os.path.join('addons', 'metamod', 'bin', 'win64'))
|
||||||
builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'metamod_win64.vdf'),
|
builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'metamod_win64.vdf'),
|
||||||
os.path.join('addons', 'metamod_x64.vdf'))
|
os.path.join('addons', 'metamod_x64.vdf'))
|
||||||
elif builder.target.platform == 'linux':
|
elif cxx.target.platform == 'linux':
|
||||||
bin64_folder = builder.AddFolder(os.path.join('addons', 'metamod', 'bin', 'linux64'))
|
bin64_folder = builder.AddFolder(os.path.join('addons', 'metamod', 'bin', 'linux64'))
|
||||||
builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'metamod_linux64.vdf'),
|
builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'metamod_linux64.vdf'),
|
||||||
os.path.join('addons', 'metamod_x64.vdf'))
|
os.path.join('addons', 'metamod_x64.vdf'))
|
||||||
elif builder.target.platform == 'mac':
|
elif cxx.target.platform == 'mac':
|
||||||
bin64_folder = builder.AddFolder(os.path.join('addons', 'metamod', 'bin', 'osx64'))
|
bin64_folder = builder.AddFolder(os.path.join('addons', 'metamod', 'bin', 'osx64'))
|
||||||
builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'metamod_osx64.vdf'),
|
builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'metamod_osx64.vdf'),
|
||||||
os.path.join('addons', 'metamod_x64.vdf'))
|
os.path.join('addons', 'metamod_x64.vdf'))
|
||||||
@ -28,7 +28,7 @@ builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'README.txt'), metam
|
|||||||
|
|
||||||
pdb_list = []
|
pdb_list = []
|
||||||
for task in MMS.binaries:
|
for task in MMS.binaries:
|
||||||
if '.x64' + os.sep in task.binary.path:
|
if task.target.arch == 'x86_64':
|
||||||
builder.AddCopy(task.binary, bin64_folder)
|
builder.AddCopy(task.binary, bin64_folder)
|
||||||
else:
|
else:
|
||||||
builder.AddCopy(task.binary, bin_folder)
|
builder.AddCopy(task.binary, bin_folder)
|
||||||
|
@ -19,6 +19,17 @@ our ($root) = getcwd();
|
|||||||
|
|
||||||
my $reconf = 0;
|
my $reconf = 0;
|
||||||
|
|
||||||
|
my $trigger_file = 'support/buildbot/trigger_full_rebuild';
|
||||||
|
if (-f $trigger_file) {
|
||||||
|
my $trigger_mtime = (stat $trigger_file)[9];
|
||||||
|
if (-f 'OUTPUT/.ambuild2/graph') {
|
||||||
|
my $graph_mtime = (stat 'OUTPUT/.ambuild2/graph')[9];
|
||||||
|
if ($trigger_mtime > $graph_mtime) {
|
||||||
|
print "Trigger time $trigger_mtime > $graph_mtime, cleaning objdir...\n";
|
||||||
|
rmtree('OUTPUT');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!(-f 'OUTPUT/.ambuild2/graph') || !(-f 'OUTPUT/.ambuild2/vars')) {
|
if (!(-f 'OUTPUT/.ambuild2/graph') || !(-f 'OUTPUT/.ambuild2/vars')) {
|
||||||
rmtree('OUTPUT');
|
rmtree('OUTPUT');
|
||||||
mkdir('OUTPUT') or die("Failed to create output folder: $!\n");
|
mkdir('OUTPUT') or die("Failed to create output folder: $!\n");
|
||||||
@ -49,6 +60,7 @@ if ($^O !~ /MSWin/) {
|
|||||||
} else {
|
} else {
|
||||||
push(@conf_argv, '--target-arch=x86');
|
push(@conf_argv, '--target-arch=x86');
|
||||||
}
|
}
|
||||||
|
push(@conf_argv, '--sdks=all');
|
||||||
|
|
||||||
my $conf_args = join(' ', @conf_argv);
|
my $conf_args = join(' ', @conf_argv);
|
||||||
|
|
||||||
@ -56,7 +68,7 @@ if ($argn > 0 && $^O !~ /MSWin/) {
|
|||||||
$result = `CC=$ARGV[0] CXX=$ARGV[0] python ../build/configure.py $conf_args`;
|
$result = `CC=$ARGV[0] CXX=$ARGV[0] python ../build/configure.py $conf_args`;
|
||||||
} else {
|
} else {
|
||||||
if ($^O =~ /MSWin/) {
|
if ($^O =~ /MSWin/) {
|
||||||
$result = `C:\\Python27\\Python.exe ..\\build\\configure.py $conf_args`;
|
$result = `C:\\Python38\\Python.exe ..\\build\\configure.py $conf_args`;
|
||||||
} else {
|
} else {
|
||||||
$result = `CC=clang CXX=clang python ../build/configure.py $conf_args`;
|
$result = `CC=clang CXX=clang python ../build/configure.py $conf_args`;
|
||||||
}
|
}
|
||||||
|
1
support/buildbot/trigger_full_rebuild
Normal file
1
support/buildbot/trigger_full_rebuild
Normal file
@ -0,0 +1 @@
|
|||||||
|
Aug 19, 2020
|
@ -1,9 +1,9 @@
|
|||||||
# vim: sts=2 ts=8 sw=2 tw=99 et ft=python:
|
# vim: sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||||
|
|
||||||
rvalue = {}
|
rvalue = {}
|
||||||
for arch in MMS.archs:
|
for cxx in MMS.all_targets:
|
||||||
libname = 'version'
|
libname = 'version'
|
||||||
lib = MMS.StaticLibrary(builder, libname, arch)
|
lib = MMS.StaticLibrary(cxx, libname)
|
||||||
lib.compiler.defines.remove('MMS_USE_VERSIONLIB')
|
lib.compiler.defines.remove('MMS_USE_VERSIONLIB')
|
||||||
lib.compiler.sourcedeps += MMS.generated_headers
|
lib.compiler.sourcedeps += MMS.generated_headers
|
||||||
lib.sources += [
|
lib.sources += [
|
||||||
@ -12,5 +12,4 @@ for arch in MMS.archs:
|
|||||||
|
|
||||||
cmd = builder.Add(lib)
|
cmd = builder.Add(lib)
|
||||||
|
|
||||||
rvalue[arch] = cmd.binary
|
rvalue[cxx.target.arch] = cmd.binary
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user