[PATCH] D141705: [HLSL] [Dirver] add dxv as a Driver Action Job

Xiang Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 27 12:12:07 PST 2023


python3kgae marked an inline comment as done.
python3kgae added inline comments.


================
Comment at: clang/lib/Driver/Driver.cpp:4216
+  llvm::Triple T(getTargetTriple());
+  if (T.getArch() == llvm::Triple::dxil && !Args.getLastArg(options::OPT_dxc_disable_validation)) {
+    // Only add action when 'dxv' exists.
----------------
jhuber6 wrote:
> Could we move this logic into the HLSL ToolChain like we do with CUDA / ROCm? You should be able to then cast the toolchain to `HLSLToolChain` and query it here.
Cannot find a cast example :(
Created a static method for HLSLToolChain to put the logic.


================
Comment at: clang/lib/Driver/ToolChains/HLSL.cpp:171
+    // discover the dxv executable.
+    getProgramPaths().push_back(getDriver().Dir);
+}
----------------
jhuber6 wrote:
> Just to check since I'm not really familiar at all with this toolchain, but does `dxv` exist as a clang tool? This path exists to search in the `/path/to/llvm/install/bin` directory. If it's an external binary this shouldn't be necessary.
It will be external binary for a long time.
Removed the getDriver().Dir.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141705/new/

https://reviews.llvm.org/D141705



More information about the cfe-commits mailing list