[PATCH] D158113: [Driver][DXC] Accept debug flags (/Zi and /Qembed_debug)
Justin Bogner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 17 16:19:46 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbe5c8dea1e1d: [Driver][DXC] Accept debug flags (/Zi and /Qembed_debug) (authored by bogner).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158113/new/
https://reviews.llvm.org/D158113
Files:
clang/include/clang/Driver/Options.td
clang/test/Driver/dxc_debug.hlsl
Index: clang/test/Driver/dxc_debug.hlsl
===================================================================
--- /dev/null
+++ clang/test/Driver/dxc_debug.hlsl
@@ -0,0 +1,14 @@
+// RUN: %clang_dxc -Tlib_6_7 -### -g %s 2>&1 | FileCheck %s
+// RUN: %clang_dxc -Tlib_6_7 -### /Zi %s 2>&1 | FileCheck %s
+// RUN: %clang_dxc -Tlib_6_7 -### /Zi /Qembed_debug %s 2>&1 | FileCheck %s
+// RUN: %clang_dxc -Tlib_6_7 -### -Zi %s 2>&1 | FileCheck %s
+// RUN: %clang_dxc -Tlib_6_7 -### -Zi -Qembed_debug %s 2>&1 | FileCheck %s
+// RUN: %clang_dxc -Tlib_6_7 -### -Zi -gcodeview %s 2>&1 | FileCheck %s -check-prefixes=CHECK,CHECK-CV
+// RUN: %clang_dxc -Tlib_6_7 -### -Zi -gdwarf %s 2>&1 | FileCheck %s -check-prefixes=CHECK,CHECK-DWARF
+// RUN: %clang_dxc -Tlib_6_7 -### -gcodeview -Zi %s 2>&1 | FileCheck %s -check-prefixes=CHECK,CHECK-CV
+// RUN: %clang_dxc -Tlib_6_7 -### -gdwarf -Zi %s 2>&1 | FileCheck %s -check-prefixes=CHECK,CHECK-DWARF
+
+// CHECK: "-cc1"
+// CHECK-CV-SAME: -gcodeview
+// CHECK-SAME: "-debug-info-kind=constructor"
+// CHECK-DWARF-SAME: -dwarf-version
Index: clang/include/clang/Driver/Options.td
===================================================================
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -7869,7 +7869,7 @@
def _SLASH_ZH_SHA_256 : CLFlag<"ZH:SHA_256">,
HelpText<"Use SHA256 for file checksums in debug info">,
Alias<gsrc_hash_EQ>, AliasArgs<["sha256"]>;
-def _SLASH_Zi : CLFlag<"Zi">, Alias<g_Flag>,
+def _SLASH_Zi : CLFlag<"Zi", [CLOption, DXCOption]>, Alias<g_Flag>,
HelpText<"Like /Z7">;
def _SLASH_Zp : CLJoined<"Zp">,
HelpText<"Set default maximum struct packing alignment">,
@@ -8202,3 +8202,6 @@
HelpText<"DXIL validator installation path">;
def dxc_disable_validation : DXCFlag<"Vd">,
HelpText<"Disable validation">;
+def : Option<["/", "-"], "Qembed_debug", KIND_FLAG>, Group<dxc_Group>,
+ Flags<[Ignored, NoXarchOption]>, Visibility<[DXCOption]>,
+ HelpText<"Embed PDB in shader container (ignored)">;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158113.551315.patch
Type: text/x-patch
Size: 2010 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230817/b3c43d71/attachment.bin>
More information about the cfe-commits
mailing list