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

Fix CMake gen when HLSL_BUILD_DXILCONV=0 #6911

Conversation

amaiorano
Copy link
Collaborator

Do not add dep on DxcEtw and DxcRuntimeEtw if HLSL_BUILD_DXILCONV is not enabled, otherwise CMake gen fails because these targets are not defined.

Do not add dep on DxcEtw and DxcRuntimeEtw if HLSL_BUILD_DXILCONV is not
enabled, otherwise CMake gen fails because these targets are not
defined.
@amaiorano amaiorano requested a review from a team as a code owner September 12, 2024 14:25
@@ -58,7 +58,7 @@ target_link_libraries(dxildll PRIVATE
dxcvalidator
)

if (WIN32)
if (WIN32 AND HLSL_BUILD_DXILCONV)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dxildll does use DxcRuntimeEtw and DxcEtw.
Maybe we should always enable DxcRuntimeEtw and DxcEtw instead of guard it with HLSL_BUILD_DXILCONV on WIN32.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We currently disable HLSL_BUILD_DXILCONV in our build as we don't need it, and it speeds up our builds at Google. I would rather we keep this guard.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only DxcRuntimeEtw is guard by HLSL_BUILD_DXILCONV currently because dxcetw is used by dxcompiler.
But dxildll does use DxcRuntimeEtw, without it dxildll will get error for cannot find DxcRuntimeEtw.h.

Maybe we should add HLSL_BUILD_DXILDLL, and guard DxcRuntimeEtw with (HLSL_BUILD_DXILCONV or HLSL_BUILD_DXILDLL)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I pushed too early. Still fixing this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I pushed what I think you asked for. However, I'm not sure if adding HLSL_BUILD_DXILDLL is what we want. This is perhaps a maintenance burden that isn't warranted for DXC.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we always build dxildll, then there's no need to guard DxcRuntimeEtw since it will be required by dxildll.
That will be another way to fix this issue.
Let's see how others feel about it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly what I was thinking! I just pushed #6912 which does exactly that.

@@ -58,6 +58,7 @@ target_link_libraries(dxildll PRIVATE
dxcvalidator
)

if (HLSL_BUILD_DXILDLL)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use HLSL_BUILD_DXILDLL guard add_subdirectory(dxildll) in tools/clang/tools/CMakeLists.txt.

list(APPEND CLANG_TEST_DEPS
dxildll
)
endif()
else()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
else()
endif()

@amaiorano
Copy link
Collaborator Author

Closing this one in favor of #6912

@amaiorano amaiorano closed this Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants