1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-01-04 00:23:25 +08:00

AMBuild: fix --targets being ignored

This commit is contained in:
Nick Hastings 2024-04-20 13:05:30 -04:00
parent c489fe84ba
commit 9e5b0edaa2

View File

@ -30,16 +30,21 @@ class SDKConfig(object):
self.targets = [] self.targets = []
self.target_archs = set() self.target_archs = set()
for arch in ['x86', 'x86_64']: if builder.options.targets:
try: target_archs = builder.options.targets.split(',')
cxx = builder.DetectCxx(target_arch = arch) else:
self.target_archs.add(cxx.target.arch) target_archs = ['x86', 'x86_64']
except Exception as e:
if builder.options.targets: for arch in target_archs:
raise try:
print('Skipping target {}: {}'.format(arch, e)) cxx = builder.DetectCxx(target_arch = arch)
continue self.target_archs.add(cxx.target.arch)
self.targets.append(cxx) except Exception as e:
if builder.options.targets:
raise
print('Skipping target {}: {}'.format(arch, e))
continue
self.targets.append(cxx)
if not self.targets: if not self.targets:
raise Exception('No suitable C/C++ compiler was found.') raise Exception('No suitable C/C++ compiler was found.')