Skip to content

Commit 5e2e250

Browse files
committed
[lldb] Fix building LLDB standlone without framework
In a809720 I refactored some logic to deal with the clang resource directory in standalone LLDB builds. However, this logic escaped me because it only runs when you do not build LLDB.framework. Differential Revision: https://reviews.llvm.org/D156763 (cherry picked from commit 6888de1)
1 parent 342f3fc commit 5e2e250

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lldb/source/API/CMakeLists.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,11 @@ else()
232232
# When building the LLDB framework, this isn't necessary as there we copy everything we need into
233233
# the framework (including the Clang resourece directory).
234234
if(NOT LLDB_BUILD_FRAMEWORK)
235-
get_target_property(liblldb_TARGET_FILE_DIR liblldb TARGET_FILE_DIR)
236-
file(MAKE_DIRECTORY "${liblldb_TARGET_FILE_DIR}/clang")
235+
set(LLDB_CLANG_RESOURCE_DIR "$<TARGET_FILE_DIR:liblldb>/clang")
237236
add_custom_command(TARGET liblldb POST_BUILD
238-
COMMENT "Linking Clang resource dir into LLDB build directory: ${liblldb_TARGET_FILE_DIR}/clang"
239-
COMMAND ${CMAKE_COMMAND} -E make_directory "${liblldb_TARGET_FILE_DIR}/clang"
240-
COMMAND ${CMAKE_COMMAND} -E create_symlink "${LLDB_EXTERNAL_CLANG_RESOURCE_DIR}" "${liblldb_TARGET_FILE_DIR}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}"
237+
COMMENT "Linking Clang resource dir into LLDB build directory: ${LLDB_CLANG_RESOURCE_DIR}"
238+
COMMAND ${CMAKE_COMMAND} -E create_symlink
239+
"${LLDB_EXTERNAL_CLANG_RESOURCE_DIR}" "${LLDB_CLANG_RESOURCE_DIR}"
241240
)
242241
endif()
243242
endif()

0 commit comments

Comments
 (0)