[PATCH] D125655: [HLSL] add -P option for dxc mode.
Xiang Li via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 13 16:21:13 PDT 2022
python3kgae marked 3 inline comments as done.
python3kgae added inline comments.
================
Comment at: clang/lib/Driver/Driver.cpp:5459
+ if (AtTopLevel && !isa<DsymutilJobAction>(JA) && !isa<VerifyJobAction>(JA) &&
+ !(IsDXCMode() && C.getArgs().hasArg(options::OPT__SLASH_P))) {
if (Arg *FinalOutput = C.getArgs().getLastArg(options::OPT_o))
----------------
beanz wrote:
> Why is this change needed? Didn't we settle on having `/P` behave the way CL.exe does?
Removed.
================
Comment at: clang/lib/Driver/ToolChains/HLSL.cpp:181
+ if (DAL->hasArg(options::OPT__SLASH_P))
+ getDriver().Diag(diag::warn_drv_dxc_ignore_output_for_preprocess) << "Fo";
+
----------------
beanz wrote:
> This warning should fire in CL mode too right? Should it not be dxc-specific?
cl mode report this warning
> warning: b.txt: 'linker' input unused [-Wunused-command-line-argument]
when input is
--driver-mode=cl -Fo b.txt -P -Fi"a.txt"
For HLSL, both -Fo and -Fi should be output.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125655/new/
https://reviews.llvm.org/D125655
More information about the cfe-commits
mailing list