From db98c98a1af5a8f842a3855d211e71c4b077603e Mon Sep 17 00:00:00 2001 From: Ryan Stecker Date: Wed, 2 Jul 2014 13:46:39 -0500 Subject: [PATCH] Remove the /TP (compile as C++) msvc flag from projects that should be compiling as C. --- sourcepawn/compiler/AMBuilder | 1 + sourcepawn/jit/AMBuilder | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sourcepawn/compiler/AMBuilder b/sourcepawn/compiler/AMBuilder index 48991705..1d8e0721 100644 --- a/sourcepawn/compiler/AMBuilder +++ b/sourcepawn/compiler/AMBuilder @@ -17,6 +17,7 @@ if compiler.cc.behavior == 'gcc': elif compiler.cc.behavior == 'msvc': compiler.linkflags.remove('/SUBSYSTEM:WINDOWS') compiler.linkflags.append('/SUBSYSTEM:CONSOLE') + compiler.cxxflags.remove('/TP') if builder.target_platform == 'linux': compiler.defines += [ diff --git a/sourcepawn/jit/AMBuilder b/sourcepawn/jit/AMBuilder index 7b3fb6cc..77c3cdfd 100644 --- a/sourcepawn/jit/AMBuilder +++ b/sourcepawn/jit/AMBuilder @@ -17,6 +17,9 @@ binary.compiler.includes += [ if builder.target_platform == 'linux': binary.compiler.postlink += ['-lpthread', '-lrt'] +if binary.compiler.cc.behavior == 'msvc': + binary.compiler.cxxflags.remove('/TP') + binary.sources += [ 'BaseRuntime.cpp', 'engine2.cpp',