From e4b653a91b64e8f3f2f52dc9b5aaf57494af90c7 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 11 Oct 2023 22:04:45 -0700 Subject: [PATCH] Restrict C++ linker workarounds to Linux. --- AMBuildScript | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/AMBuildScript b/AMBuildScript index 6a2e0a5..78916de 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -338,11 +338,13 @@ class MMSConfig(object): def HL2Library(self, context, compiler, name, sdk): binary = self.Library(compiler, name) - binary.sources += [ - os.path.join(context.sourcePath, 'third_party', 'amtl', 'compat', 'stdcxx.cpp'), - ] cxx = binary.compiler + if cxx.target.platform == 'linux': + binary.sources += [ + os.path.join(context.sourcePath, 'third_party', 'amtl', 'compat', 'stdcxx.cpp'), + ] + cxx.cxxincludes += [ os.path.join(context.currentSourcePath), os.path.join(context.currentSourcePath, 'sourcehook'),