This is an archive of the discontinued LLVM Phabricator instance.

[HLSL] Pass flags to cc1 based on language
ClosedPublic

Authored by beanz on Sep 15 2022, 10:46 AM.

Details

Summary

Having the flags only pass through if you're using the dxc-driver means
that the clang driver doesn't work for HLSL, which is undesirable. This
change switches to instead passing flags based on the language mode
similar to how OpenCL does it. This allows the clang driver to be used
for HLSL source files as well.

Diff Detail

Event Timeline

beanz created this revision.Sep 15 2022, 10:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 15 2022, 10:46 AM
Herald added a subscriber: Anastasia. · View Herald Transcript
beanz requested review of this revision.Sep 15 2022, 10:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 15 2022, 10:46 AM
Herald added a subscriber: MaskRay. · View Herald Transcript
python3kgae added inline comments.Sep 15 2022, 10:54 AM
clang/test/Driver/hlsl_no_stdinc.hlsl
2

-target?

beanz updated this revision to Diff 460464.Sep 15 2022, 11:02 AM

Fixing test typo, thanks @python3kgae!

python3kgae accepted this revision.Sep 15 2022, 11:04 AM
This revision is now accepted and ready to land.Sep 15 2022, 11:04 AM
This revision was automatically updated to reflect the committed changes.