From a36a44998370a738b0d34d927fbdd630a0ae11ad Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Mon, 24 Aug 2026 18:20:05 -0400 Subject: [PATCH] Fix build --- AMBuildScript | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/AMBuildScript b/AMBuildScript index 0cf6d976..965b9189 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -438,11 +438,19 @@ class SMConfig(object): self.libamtl[cxx.target.arch] = libamtl.binary def BinaryOutputName(self, binary, binary_type): + target = binary.compiler.target if binary_type == 'program': - return binary.compiler.vendor.nameForExecutable(binary.name_) - if binary_type == 'library': - return binary.compiler.vendor.nameForSharedLibrary(binary.name_) - raise Exception('Unsupported binary type: {}'.format(binary_type)) + name_fn = binary.compiler.vendor.nameForExecutable + elif binary_type == 'library': + name_fn = binary.compiler.vendor.nameForSharedLibrary + else: + raise Exception('Unsupported binary type: {}'.format(binary_type)) + + try: + return name_fn(binary.name_, target) + except TypeError: + # Older AMBuild versions did not require the target argument. + return name_fn(binary.name_) def AddVersioning(self, binary, binary_type): if binary.compiler.target.platform == 'windows':