Skip to content

Commit 127ce2f

Browse files
committed
[moz] Remove ETW from the build.
Fixing the ETW dependency is probably doable but it doesn't seem straightforward with our cross-compilation setup and having a few ETW markers in DXC isn't hugely important for us so this commit removes them from the build. To reduce risk of rebase conflicts, the DxcEtw API is stubbed out in include/dxcetw.h which would have normally been generated as part of the build.
1 parent d674bd0 commit 127ce2f

File tree

4 files changed

+34
-4
lines changed

4 files changed

+34
-4
lines changed

include/dxc/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ configure_file(
1818
add_subdirectory(DXIL)
1919
add_subdirectory(DxilContainer)
2020
add_subdirectory(Support)
21-
add_subdirectory(Tracing)
21+
#add_subdirectory(Tracing)
2222

2323
set(DXC_PUBLIC_HEADERS
2424
${CMAKE_CURRENT_BINARY_DIR}/config.h

include/dxcetw.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Stubbed out tracing functions to remove ETW dependency from the build.
2+
3+
#ifndef DXC_ETW_H
4+
#define DXC_ETW_H
5+
6+
inline void EventRegisterMicrosoft_Windows_DXCompiler_API() {}
7+
inline void EventUnregisterMicrosoft_Windows_DXCompiler_API() {}
8+
9+
inline void DxcEtw_DXCompilerInitialization_Start() {}
10+
inline void DxcEtw_DXCompilerInitialization_Stop(HRESULT hr) {}
11+
12+
inline void DxcEtw_DXCompilerShutdown_Start() {}
13+
inline void DxcEtw_DXCompilerShutdown_Stop(HRESULT hr) {}
14+
15+
inline void DxcEtw_DXCompilerCreateInstance_Start() {}
16+
inline void DxcEtw_DXCompilerCreateInstance_Stop(HRESULT hr) {}
17+
18+
inline void DxcEtw_DXCompilerDisassemble_Start() {}
19+
inline void DxcEtw_DXCompilerDisassemble_Stop(HRESULT hr) {}
20+
21+
inline void DxcEtw_DXCompilerPreprocess_Start() {}
22+
inline void DxcEtw_DXCompilerPreprocess_Stop(HRESULT hr) {}
23+
24+
inline void DxcEtw_DXCompilerCompile_Start() {}
25+
inline void DxcEtw_DXCompilerCompile_Stop(HRESULT hr) {}
26+
27+
inline void DxcEtw_DxcValidation_Start() {}
28+
inline void DxcEtw_DxcValidation_Stop(HRESULT hr) {}
29+
30+
#endif

tools/clang/tools/dxcompiler/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ add_clang_library(dxcompiler SHARED ${SOURCES})
130130
add_dependencies(dxcompiler TablegenHLSLOptions)
131131
if (MSVC)
132132
# No DxcEtw on non-Windows platforms.
133-
add_dependencies(dxcompiler DxcEtw)
133+
#add_dependencies(dxcompiler DxcEtw)
134134
endif()
135135
target_link_libraries(dxcompiler PRIVATE ${LIBRARIES})
136136
if (ENABLE_SPIRV_CODEGEN)

tools/clang/tools/dxildll/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ target_link_libraries(dxildll PRIVATE
6161
if (WIN32)
6262
add_dependencies(dxildll
6363
${DXCDependencies}
64-
DxcEtw
65-
DxcRuntimeEtw
64+
#DxcEtw
65+
#DxcRuntimeEtw
6666
)
6767
else()
6868
add_dependencies(dxildll

0 commit comments

Comments
 (0)