Skip to content

[cmake] Use Windows-specific LLDB test args on Windows #9103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions lldb/test/API/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,19 @@ option(LLDB_TEST_SWIFT "Use in-tree swift when testing lldb" On)
if(LLDB_TEST_SWIFT)
set(LLDB_SWIFTC ${SWIFT_BINARY_DIR}/bin/swiftc CACHE STRING "Path to swift compiler")
set(LLDB_SWIFT_LIBS ${SWIFT_LIBRARY_DIR}/swift CACHE STRING "Path to swift libraries")

# Prefer the just-built stdlib over the system one.
set(SWIFT_TEST_ARGS
--inferior-env "DYLD_LIBRARY_PATH=\\\"${LLDB_SWIFT_LIBS}/macosx:${LLVM_LIBRARY_OUTPUT_INTDIR}/lldb/clang/lib/darwin\\\""
--inferior-env "LD_LIBRARY_PATH=\\\"${LLDB_SWIFT_LIBS}/${CMAKE_SYSTEM_PROCESSOR}\\\""
--inferior-env "SIMCTL_CHILD_DYLD_LIBRARY_PATH=\\\"${LLDB_SWIFT_LIBS}/macosx\\\"")
if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
set(SWIFT_TEST_ARGS
--inferior-env "DYLD_LIBRARY_PATH=\\\"${LLDB_SWIFT_LIBS}/windows:${LLVM_LIBRARY_OUTPUT_INTDIR}/lldb/clang/lib/${LLVM_HOST_TRIPLE}\\\""
--inferior-env "LD_LIBRARY_PATH=\\\"${LLDB_SWIFT_LIBS}/${CMAKE_SYSTEM_PROCESSOR}\\\""
--inferior-env "SIMCTL_CHILD_DYLD_LIBRARY_PATH=\\\"${LLDB_SWIFT_LIBS}/windows\\\"")
else()
set(SWIFT_TEST_ARGS
--inferior-env "DYLD_LIBRARY_PATH=\\\"${LLDB_SWIFT_LIBS}/macosx:${LLVM_LIBRARY_OUTPUT_INTDIR}/lldb/clang/lib/darwin\\\""
--inferior-env "LD_LIBRARY_PATH=\\\"${LLDB_SWIFT_LIBS}/${CMAKE_SYSTEM_PROCESSOR}\\\""
--inferior-env "SIMCTL_CHILD_DYLD_LIBRARY_PATH=\\\"${LLDB_SWIFT_LIBS}/macosx\\\"")
endif()
endif()
# END - Swift Mods

Expand Down