[clang][Driver] use DWARF4 for wasm

Opt into the old default of DWARF4 for now.

Differential Revision: https://reviews.llvm.org/D118082
This commit is contained in:
Derek Schuff 2022-01-24 14:59:54 -08:00
parent 3e746c6d9e
commit d0d8d2d572
2 changed files with 8 additions and 0 deletions

View File

@ -51,6 +51,7 @@ private:
bool hasBlocksRuntime() const override;
bool SupportsProfiling() const override;
bool HasNativeLLVMSupport() const override;
unsigned GetDefaultDwarfVersion() const override { return 4; }
void
addClangTargetOptions(const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CC1Args,

View File

@ -132,6 +132,13 @@
// RUN: %clang -### -c -g %s -target powerpc64-ibm-aix-xcoff -gcolumn-info \
// RUN: 2>&1 | FileCheck -check-prefix=CI %s
// WebAssembly.
// WebAssembly should default to DWARF4.
// RUN: %clang -### -c -g %s -target wasm32 2>&1 \
// RUN: | FileCheck -check-prefix=G_DWARF4 %s
// RUN: %clang -### -c -g %s -target wasm64 2>&1 \
// RUN: | FileCheck -check-prefix=G_DWARF4 %s
// RUN: %clang -### -c -gdwarf-2 %s 2>&1 \
// RUN: | FileCheck -check-prefix=G_ONLY_DWARF2 %s
//