-
Notifications
You must be signed in to change notification settings - Fork 709
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
Fix CMake gen when HLSL_BUILD_DXILCONV=0 #6911
Conversation
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.
@@ -58,7 +58,7 @@ target_link_libraries(dxildll PRIVATE | |||
dxcvalidator | |||
) | |||
|
|||
if (WIN32) | |||
if (WIN32 AND HLSL_BUILD_DXILCONV) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else() | |
endif() |
Closing this one in favor of #6912 |
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.