forked from OSchip/llvm-project
clang-cl: Pass /Z7 when we fallback to cl with debug info enabled
Clang itself only emits CodeView line tables, so it seems more consistent to ask cl.exe for the same format. llvm-svn: 201721
This commit is contained in:
parent
3b49fdb640
commit
c688dafe31
|
@ -7221,6 +7221,8 @@ Command *visualstudio::Compile::GetCommand(Compilation &C, const JobAction &JA,
|
|||
: "/GR-");
|
||||
if (Args.hasArg(options::OPT_fsyntax_only))
|
||||
CmdArgs.push_back("/Zs");
|
||||
if (Args.hasArg(options::OPT_g_Flag, options::OPT_gline_tables_only))
|
||||
CmdArgs.push_back("/Z7");
|
||||
|
||||
std::vector<std::string> Includes = Args.getAllArgValues(options::OPT_include);
|
||||
for (size_t I = 0, E = Includes.size(); I != E; ++I)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// command-line option, e.g. on Mac where %s is commonly under /Users.
|
||||
|
||||
// RUN: %clang_cl /fallback /Dfoo=bar /Ubaz /Ifoo /O0 /Ox /GR /GR- /LD /LDd \
|
||||
// RUN: /MD /MDd /MTd /MT /FImyheader.h -### -- %s 2>&1 | FileCheck %s
|
||||
// RUN: /MD /MDd /MTd /MT /FImyheader.h /Zi -### -- %s 2>&1 | FileCheck %s
|
||||
// CHECK: "-fdiagnostics-format" "msvc-fallback"
|
||||
// CHECK: ||
|
||||
// CHECK: cl.exe
|
||||
|
@ -17,6 +17,7 @@
|
|||
// CHECK: "-I" "foo"
|
||||
// CHECK: "/Ox"
|
||||
// CHECK: "/GR-"
|
||||
// CHECK: "/Z7"
|
||||
// CHECK: "/FImyheader.h"
|
||||
// CHECK: "/LD"
|
||||
// CHECK: "/LDd"
|
||||
|
|
Loading…
Reference in New Issue