Files
clang-p2996/clang/test/Driver/dxc_fcgl.hlsl
Xiang Li 75ec24e875 [HLSL][clang][Driver] Fix error when using the option -fcgl in --driver-mode=dxc. (#97001)
When -fcgl is set in --driver-mode=dxc, both -S and -emit-llvm are
currently enabled.

This results in the following error:
```
  error: '-S' action ignored; '-emit-llvm' action specified previously.
```
This change fixes the issue by not rendering -S in RenderHLSLOptions.

Additionally, a test has been added to ensure that enabling -fcgl does
not trigger any diagnostics

Fixes #97296
2024-07-01 13:44:26 -04:00

10 lines
366 B
HLSL

// RUN: not %clang_dxc -fcgl -T lib_6_7 foo.hlsl -### %s 2>&1 | FileCheck %s
// RUN: %clang_dxc -fcgl -T lib_6_7 %s -Xclang -verify
// Make sure fcgl option flag which translated into "-emit-llvm" "-disable-llvm-passes".
// CHECK: "-emit-llvm"
// CHECK-SAME: "-disable-llvm-passes"
// Make sure fcgl option not generate any diagnostics.
// expected-no-diagnostics