Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9da5b7a

Browse files
bulbazordtru
authored andcommittedSep 29, 2023
[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 c056d72 commit 9da5b7a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed
 

‎lldb/source/API/CMakeLists.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,11 @@ else()
204204
# When building the LLDB framework, this isn't necessary as there we copy everything we need into
205205
# the framework (including the Clang resourece directory).
206206
if(NOT LLDB_BUILD_FRAMEWORK)
207-
set(LLDB_CLANG_RESOURCE_DIR_PARENT "$<TARGET_FILE_DIR:liblldb>/clang")
208-
file(MAKE_DIRECTORY "${LLDB_CLANG_RESOURCE_DIR_PARENT}")
207+
set(LLDB_CLANG_RESOURCE_DIR "$<TARGET_FILE_DIR:liblldb>/clang")
209208
add_custom_command(TARGET liblldb POST_BUILD
210-
COMMENT "Linking Clang resource dir into LLDB build directory: ${LLDB_CLANG_RESOURCE_DIR_PARENT}"
211-
COMMAND ${CMAKE_COMMAND} -E make_directory "${LLDB_CLANG_RESOURCE_DIR_PARENT}"
212-
COMMAND ${CMAKE_COMMAND} -E create_symlink "${LLDB_EXTERNAL_CLANG_RESOURCE_DIR}"
213-
"${LLDB_CLANG_RESOURCE_DIR_PARENT}/${LLDB_CLANG_RESOURCE_DIR_NAME}"
209+
COMMENT "Linking Clang resource dir into LLDB build directory: ${LLDB_CLANG_RESOURCE_DIR}"
210+
COMMAND ${CMAKE_COMMAND} -E create_symlink
211+
"${LLDB_EXTERNAL_CLANG_RESOURCE_DIR}" "${LLDB_CLANG_RESOURCE_DIR}"
214212
)
215213
endif()
216214
endif()

0 commit comments

Comments
 (0)
Please sign in to comment.