Index: include/clang/Driver/ToolChain.h =================================================================== --- include/clang/Driver/ToolChain.h +++ include/clang/Driver/ToolChain.h @@ -243,7 +243,7 @@ /// UseDwarfDebugFlags - Embed the compile options to clang into the Dwarf /// compile unit information. - virtual bool UseDwarfDebugFlags() const { return false; } + virtual bool UseDwarfDebugFlags() const { return true; } /// UseSjLjExceptions - Does this tool chain use SjLj exceptions. virtual bool UseSjLjExceptions() const { return false; } Index: test/Driver/debug-flags.c =================================================================== --- /dev/null +++ test/Driver/debug-flags.c @@ -0,0 +1,4 @@ +// RUN: %clang -### -target i686-linux-gnu -c %s -o /dev/null 2>&1 | FileCheck %s + +// CHECK: -dwarf-debug-flags +