Skip to content

Commit 0a3b5ec

Browse files
authored
[MemProf] Add missing header to list of installed headers. (#79413)
There were buildbot failures when running memprof tests: Failed Tests (12): MemProfiler-x86_64-linux :: TestCases/interface_test.cpp MemProfiler-x86_64-linux :: TestCases/log_path_test.cpp MemProfiler-x86_64-linux :: TestCases/memprof_merge_mib.cpp MemProfiler-x86_64-linux :: TestCases/memprof_profile_dump.cpp MemProfiler-x86_64-linux :: TestCases/profile_reset.cpp MemProfiler-x86_64-linux :: TestCases/unaligned_loads_and_stores.cpp MemProfiler-x86_64-linux-dynamic :: TestCases/interface_test.cpp MemProfiler-x86_64-linux-dynamic :: TestCases/log_path_test.cpp MemProfiler-x86_64-linux-dynamic :: TestCases/memprof_merge_mib.cpp MemProfiler-x86_64-linux-dynamic :: TestCases/memprof_profile_dump.cpp MemProfiler-x86_64-linux-dynamic :: TestCases/profile_reset.cpp MemProfiler-x86_64-linux-dynamic :: TestCases/unaligned_loads_and_stores.cpp See - https://lab.llvm.org/buildbot/#/builders/258/builds/8852 - https://lab.llvm.org/buildbot/#/builders/258/builds/12876 I suspect the failure is because when build with -DLLVM_ENABLE_RUNTIMES=compiler-rt -DCOMPILER_RT_BUILD_SANITIZERS=OFF, the headers sanitizer/allocator_interface.h and sanitizer/common_interface_defs.h are not copied to the build tree, and not installed. But in the failed memprof tests, sanitizer/allocator_interface.h or sanitizer/memprof_interface.h is included. This patch adds sanitizer/allocator_interface.h and sanitizer/memprof_interface.h to memprof headers if COMPILER_RT_BUILD_SANITIZERS is false.
1 parent de5e4d7 commit 0a3b5ec

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

compiler-rt/include/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ if (COMPILER_RT_BUILD_MEMPROF)
2525
sanitizer/memprof_interface.h
2626
profile/MemProfData.inc
2727
)
28+
if (NOT COMPILER_RT_BUILD_SANITIZERS)
29+
set(MEMPROF_HEADERS
30+
sanitizer/allocator_interface.h
31+
sanitizer/common_interface_defs.h
32+
)
33+
endif()
2834
endif(COMPILER_RT_BUILD_MEMPROF)
2935

3036
if (COMPILER_RT_BUILD_XRAY)
@@ -90,6 +96,12 @@ if (COMPILER_RT_BUILD_MEMPROF)
9096
COMPONENT compiler-rt-headers
9197
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
9298
DESTINATION ${COMPILER_RT_INSTALL_INCLUDE_DIR}/sanitizer)
99+
if (NOT COMPILER_RT_BUILD_SANITIZERS)
100+
install(FILES sanitizer/allocator_interface.h sanitizer/common_interface_defs.h
101+
COMPONENT compiler-rt-headers
102+
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
103+
DESTINATION ${COMPILER_RT_INSTALL_INCLUDE_DIR}/sanitizer)
104+
endif()
93105
endif(COMPILER_RT_BUILD_MEMPROF)
94106
# Install xray headers.
95107
install(FILES ${XRAY_HEADERS}

0 commit comments

Comments
 (0)