Skip to content

Commit

Permalink
[clang][Driver] use DWARF4 for wasm
Browse files Browse the repository at this point in the history
Opt into the old default of DWARF4 for now.

Differential Revision: https://reviews.llvm.org/D118082
  • Loading branch information
dschuff committed Jan 24, 2022
1 parent 3e746c6 commit d0d8d2d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions clang/lib/Driver/ToolChains/WebAssembly.h
Expand Up @@ -51,6 +51,7 @@ class LLVM_LIBRARY_VISIBILITY WebAssembly final : public ToolChain {
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,
Expand Down
7 changes: 7 additions & 0 deletions clang/test/Driver/debug-options.c
Expand Up @@ -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
//
Expand Down

0 comments on commit d0d8d2d

Please sign in to comment.