From f01ad5317a6c79fc4a854a99ed90a78e08c7d69a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 13 Oct 2023 15:26:05 -0700 Subject: [PATCH] Fix linker issues on Linux. --- AMBuildScript | 8 ++++++++ public/amtl | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/AMBuildScript b/AMBuildScript index 2196f1f8..57a4405d 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -509,6 +509,7 @@ class SMConfig(object): self.AddVersioning(binary) if binary.compiler.like('msvc'): binary.compiler.linkflags += ['/SUBSYSTEM:WINDOWS'] + self.AddCxxCompat(binary) # Dumb clang behavior means we have to manually find libclang_rt. if self.enable_asan: @@ -568,9 +569,16 @@ class SMConfig(object): self.ConfigureForExtension(context, binary.compiler) return binary + def AddCxxCompat(self, binary): + if binary.compiler.target.platform == 'linux': + binary.sources += [ + os.path.join(builder.sourcePath, 'public', 'amtl', 'compat', 'stdcxx.cpp'), + ] + def ConfigureForHL2(self, context, binary, sdk): compiler = binary.compiler SetArchFlags(compiler) + self.AddCxxCompat(binary) compiler.cxxincludes += [ os.path.join(self.mms_root, 'core'), diff --git a/public/amtl b/public/amtl index fb8a4eda..285b4f85 160000 --- a/public/amtl +++ b/public/amtl @@ -1 +1 @@ -Subproject commit fb8a4edaeaeea97b1c07f42b8a8ba97ce2c614cd +Subproject commit 285b4f853c0003023838140113e3ec066bd800c6