Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable the clang-format checks when building DXC #6728

Open
Ravbug opened this issue Jun 26, 2024 · 2 comments · May be fixed by #6730
Open

Disable the clang-format checks when building DXC #6728

Ravbug opened this issue Jun 26, 2024 · 2 comments · May be fixed by #6730
Assignees
Labels
user-support Issues from users requesting support.

Comments

@Ravbug
Copy link

Ravbug commented Jun 26, 2024

What is the issue you're encountering?
When I build the dxc target from source as a subdirectory of my codebase, I get these errors:

3>Verifying clang-format results...
3>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'build\win\CMakeFiles\88778fe0101fa821569a6b8d53ded241\RDAT_LibraryTypes.inl.stamp.rule;build\win\CMakeFiles\6f5c683015713da5c9349b7bc8142ac1\RDAT_LibraryTypes.rule' exited with code 1.

A few more targets also fail with this same error. It still produces dxc.exe and dxcompiler.dll. Is it possible to turn off the clang-format checks?

Steps to Reproduce (if applicable)

  1. Clone the latest master
  2. Build the dxc target as a subdirectory of another CMake project

Environment

  • DXC version: dxcompiler.dll: 1.8 - 1.8.0.2207 (master, 452045c6f-dirty)
  • Host Operating System: Windows 10 22H2 1904.4529
  • CMake: cmake version 3.28.3-msvc11
  • Compiler: MSVC 19.40.33811.0
@Ravbug Ravbug added needs-triage Awaiting triage user-support Issues from users requesting support. labels Jun 26, 2024
@llvm-beanz
Copy link
Collaborator

We do not currently have an option to disable the clang-format verification for generated sources that get put into the DXC GitHub repository. We have a strict requirement that all code going into DXC be clang-format clean, so we want the build system to also enforce that and behave appropriately with the generated sources.

I don't think we should allow disabling the format check in isolation, but I think we could add an option to disable generating sources that get put into the DXC source tree, and since those are the only ones that get compared for differences that should resolve the build difficulties.

It is important to note that since we have a strict requirement for sources in DXC being clang-format clean, any contributions you make may need to be built with the default build configuration and our pre-merge builds enforce that requirement.

llvm-beanz added a commit to llvm-beanz/DirectXShaderCompiler that referenced this issue Jun 27, 2024
This change adds a new CMake configuration option
`HLSL_DISABLE_SOURCE_GENERATION` which allows a user to disable
generating the in-tree sources which contributte to DXC's source
releases. This option should only be used by users building DXC and not
modifying it.

Resolves microsoft#6728
@llvm-beanz llvm-beanz assigned bfavela and llvm-beanz and unassigned bfavela Jun 27, 2024
@damyanp damyanp removed the needs-triage Awaiting triage label Jun 27, 2024
@damyanp damyanp added this to the Summer 2024 Release milestone Jun 27, 2024
@Ravbug
Copy link
Author

Ravbug commented Jun 28, 2024

Thanks for the quick response! The changes in #6730 appear to fix my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user-support Issues from users requesting support.
Projects
Status: Triaged
Development

Successfully merging a pull request may close this issue.

4 participants