This is to avoid err_target_unknown_abi which is caused by use default TargetTriple instead of shader model target triple.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Driver/ToolChains/HLSL.h | ||
---|---|---|
32–33 | I don't like using an empty string as a sentinel for an error. Since this is no longer overriding an existing method, we should change it. Probably the easiest change is to llvm::Optional. Then you can return None in the failure cases. |
clang/lib/Driver/Driver.cpp | ||
---|---|---|
1242 | The -T flag is required for DXCMode, so the else of this should emit an error. That also means the code above that explicitly sets the OS to ShaderModel can be removed too. |
@python3kgae
0fbafb5a1c4381ded4bc7f59a5a6091c229faed7 is fixing leaks in this tests.
Note, the leak was missed because of unrelated issues in gtest and lsan setup which we fixed recently.
I incorrectly blamed the leak on D122865, but in fact it was D125585. I see that before this patch we have one Driver, one Compilation and both deleted correctly. Leaks are obvious, after this patch we don't delete Compilation.
I fixed the leak, but I had to remove shared driver. My concern is that maybe shared driver is important use-case. If it's so, would you like to take a look, and find how to avoid a leak with shared driver?
The -T flag is required for DXCMode, so the else of this should emit an error. That also means the code above that explicitly sets the OS to ShaderModel can be removed too.