Make Event Tracing for Windows optional #7274
Open
+80
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Microsoft Message Compiler dependency in the build system makes it impossible to build the project on Windows Nano Server, due to COM not being available in that distribution.
This PR resolves the issue by patching the build system to make ETW optional. It disables the tracing when DXC_ENABLE_ETW is turned off, using the same logic already applied when building for non-Windows platforms. When disabled, the code falls back to empty stubs.
This PR is a work in progress - currently, only the
dxcompiler
target has been built with MSVC 14.42.34433 and WinSDK 22621. A few links in case:dxcompiler
build log (Nano Server LTSC2022 container)The ETW manifest (
dxcetw.man
) is the only input for mc.exe. Its output includes a header and some .bin files (e.g., MSG00001.bin, dxcetwTEMP.bin after some copies in the custom command) but only the header (dxcetw.h
) seems to be functionally required for building and please correct me if I'm wrong. The .bin files are generated and marked in CMake as GENERATED butso, would it make sense to commit the generated header directly into version control instead? It seems to be fully deterministic