summaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-04-25 16:24:19 +0000
committerHans Wennborg <hans@hanshq.net>2014-04-25 16:24:19 +0000
commitb67bacf5c681998d875faaa0c3c47c8dea71fccb (patch)
treebd161151122d27641664d24c48945452b4e5e2cf /lib/Driver/Tools.cpp
parent7225262c2ab37c7f678921948facf3bdecc3b256 (diff)
downloadclang-b67bacf5c681998d875faaa0c3c47c8dea71fccb.tar.gz
clang-b67bacf5c681998d875faaa0c3c47c8dea71fccb.tar.bz2
clang-b67bacf5c681998d875faaa0c3c47c8dea71fccb.tar.xz
clang-cl: pass -debug flag to the linker when compiling with debug info
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207233 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 0a45fa190a..924e040246 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -7435,6 +7435,10 @@ void visualstudio::Link::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-nologo");
+ if (Args.hasArg(options::OPT_g_Group)) {
+ CmdArgs.push_back("-debug");
+ }
+
bool DLL = Args.hasArg(options::OPT__SLASH_LD, options::OPT__SLASH_LDd);
if (DLL) {