[llvm-branch-commits] [clang] [llvm] [HLSL][DirectX] Add support for `rootsig` as a target environment (PR #156373)
Finn Plummer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Sep 4 12:07:18 PDT 2025
================
@@ -1296,6 +1296,9 @@ class InjectRootSignatureCallback : public PPCallbacks {
void HLSLFrontendAction::ExecuteAction() {
// Pre-requisites to invoke
+ if (getCurrentFileKind().getLanguage() != Language::HLSL)
+ return WrapperFrontendAction::ExecuteAction();
----------------
inbelic wrote:
Good catch. TLDR: it is not required and I forgot to remove it from early iterations.
It was originally added because I was hitting [this assert](https://github.com/llvm/llvm-project/blob/6c6afdd8c262f49bb23cf455d98108f31b732c6c/clang/lib/Frontend/FrontendAction.cpp#L828) when invoking with `-emit-obj <file>` and so I thought it was because it was first creating a `.ll` file and then creating an object from that as two separate jobs. Turns out it is because you need to specify the file as `-emit-obj -o <file>`.
https://github.com/llvm/llvm-project/pull/156373
More information about the llvm-branch-commits
mailing list