Skip to content

Commit 13e674e

Browse files
[compiler-rt] Add some missing dependencies on Windows (#155019)
Trying to run check-compiler-rt on Windows currently fails due to several missing dependencies. These seem to get included transitively on Linux as there is nothing obvious adding them. I had to rework the ordering in llvm/CMakeLists.txt to be able to add the KillTheDoctor dep.
1 parent 438c099 commit 13e674e

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

llvm/CMakeLists.txt

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,6 +1376,17 @@ if( LLVM_INCLUDE_TOOLS )
13761376
add_subdirectory(tools)
13771377
endif()
13781378

1379+
# We need to setup KillTheDoctor before setting up the runtimes build because
1380+
# the runtimes build needs to add a KillTheDoctor dep for compiler-rt on
1381+
# Windows.
1382+
if (LLVM_INCLUDE_TESTS)
1383+
if (WIN32)
1384+
# This utility is used to prevent crashing tests from calling Dr. Watson on
1385+
# Windows.
1386+
add_subdirectory(utils/KillTheDoctor)
1387+
endif()
1388+
endif()
1389+
13791390
if( LLVM_INCLUDE_RUNTIMES )
13801391
add_subdirectory(runtimes)
13811392
endif()
@@ -1400,12 +1411,6 @@ if( LLVM_INCLUDE_TESTS )
14001411
add_subdirectory(test)
14011412
add_subdirectory(unittests)
14021413

1403-
if (WIN32)
1404-
# This utility is used to prevent crashing tests from calling Dr. Watson on
1405-
# Windows.
1406-
add_subdirectory(utils/KillTheDoctor)
1407-
endif()
1408-
14091414
umbrella_lit_testsuite_end(check-all)
14101415
get_property(LLVM_ALL_LIT_DEPENDS GLOBAL PROPERTY LLVM_ALL_LIT_DEPENDS)
14111416
get_property(LLVM_ALL_ADDITIONAL_TEST_DEPENDS

llvm/runtimes/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,10 @@ if(build_runtimes)
482482
llvm-lto
483483
llvm-jitlink
484484
llvm-nm
485+
llvm-strip
485486
llvm-objdump
486487
llvm-profdata
488+
llvm-readobj
487489
llvm-size
488490
llvm-symbolizer
489491
llvm-xray
@@ -499,6 +501,9 @@ if(build_runtimes)
499501
list(APPEND extra_deps ${dep})
500502
endif()
501503
endforeach()
504+
if(WIN32)
505+
list(APPEND extra_deps KillTheDoctor)
506+
endif()
502507
endif()
503508

504509
# Forward user-provived system configuration to runtimes for requirement introspection.

0 commit comments

Comments
 (0)