Skip to content

Commit cfcfd8a

Browse files
committed
build: avoid cached literals being linked against
If the value of the LibXml2 search is cached, it can cause an errant link against LIBXML2_LIBRARIES-NOTFOUND if libxml2 is not found. Add a guard against this. Should repair the build bots.
1 parent 340e7c0 commit cfcfd8a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/lib/WindowsManifest/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ add_llvm_component_library(LLVMWindowsManifest
33

44
ADDITIONAL_HEADER_DIRS
55
${LLVM_MAIN_INCLUDE_DIR}/llvm/WindowsManifest
6-
${Backtrace_INCLUDE_DIRS}
6+
${Backtrace_INCLUDE_DIRS})
77

8-
LINK_LIBS ${LIBXML2_LIBRARIES}
9-
)
10-
11-
set_property(TARGET LLVMWindowsManifest PROPERTY
12-
LLVM_SYSTEM_LIBS ${LIBXML2_LIBRARIES})
8+
if(LIBXML2_LIBRARIES)
9+
target_link_libraries(LLVMWindowsManifest PUBLIC ${LIBXML2_LIBRARIES})
10+
set_property(TARGET LLVMWindowsManifest PROPERTY
11+
LLVM_SYSTEM_LIBS ${LIBXML2_LIBRARIES})
12+
endif()

0 commit comments

Comments
 (0)