summaryrefslogtreecommitdiff
path: root/solenv/gcc-wrappers
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-04-11 14:43:19 +0200
committerMichael Stahl <mstahl@redhat.com>2013-04-15 15:26:32 +0200
commit3b65852f37f1c8daf8c5c0af1d810c68cc71d8e3 (patch)
treee724da7f17cffec4a5e68897c8e34857dd8bf354 /solenv/gcc-wrappers
parent54ba172dc13ababef911550a88083452832b4744 (diff)
gbuild: add support for building against MSVC debug runtime
Mainly this means using /MDd instead of /MD and /MTd instead of /MT in the CFLAGS, and also re-mapping of .lib files to ones with "d". Change-Id: Ifc56b53a66d5eb522c1695a34d68b08cad1d8338
Diffstat (limited to 'solenv/gcc-wrappers')
-rw-r--r--solenv/gcc-wrappers/wrapper.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx
index a768eefaa362..151979ca7991 100644
--- a/solenv/gcc-wrappers/wrapper.cxx
+++ b/solenv/gcc-wrappers/wrapper.cxx
@@ -72,7 +72,11 @@ string processccargs(vector<string> rawargs) {
string args=" -nologo";
// TODO: should these options be enabled globally?
args.append(" -EHsc");
- args.append(" -MD");
+ const char *const pDebugRuntime(getenv("MSVC_USE_DEBUG_RUNTIME"));
+ if (pDebugRuntime && !strcmp(pDebugRuntime, "TRUE"))
+ args.append(" -MDd");
+ else
+ args.append(" -MD");
args.append(" -Gy");
args.append(" -Zc:wchar_t-");
args.append(" -Ob1 -Oxs -Oy-");