forked from OSchip/llvm-project
Pass dwarf-version to cc1as.
Fix PR26999 - crashing in cc1as with any '*bsd' target. llvm-svn: 266775
This commit is contained in:
parent
d5cb34118d
commit
5a9a685405
|
@ -6314,6 +6314,12 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
// FIXME: Stop lying and consume only the appropriate driver flags
|
||||
Args.ClaimAllArgs(options::OPT_W_Group);
|
||||
|
||||
// Assemblers that want to know the dwarf version can't assume a value,
|
||||
// since the defaulting logic resides in the driver. Put in something
|
||||
// reasonable now, in case a subsequent "-Wa,-g" changes it.
|
||||
RenderDebugEnablingArgs(Args, CmdArgs, codegenoptions::NoDebugInfo,
|
||||
getToolChain().GetDefaultDwarfVersion(),
|
||||
llvm::DebuggerKind::Default);
|
||||
CollectArgsForIntegratedAssembler(C, Args, CmdArgs,
|
||||
getToolChain().getDriver());
|
||||
|
||||
|
|
|
@ -77,3 +77,8 @@
|
|||
// CHECK-OBJ-NOO: "-o" "save-temps.s"
|
||||
// CHECK-OBJ-NOO: "-o" "save-temps.o"
|
||||
// CHECK-OBJ-NOO: "-o" "a.out"
|
||||
|
||||
// RUN: %clang -target i386-unknown-freebsd -save-temps -g -c %s -### 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix=CHECK-SAVE-TEMPS
|
||||
// CHECK-SAVE-TEMPS: "-cc1as"
|
||||
// CHECK-SAVE-TEMPS: "-dwarf-version={{.}}"
|
||||
|
|
Loading…
Reference in New Issue