Skip to content

Commit 026861b

Browse files
author
Zachary Turner
committed
Move the post-build step that creates lldb.py.
Being in lldb\source, ${CMAKE_CURRENT_BINARY_DIR} would resolve to the build\tools\lldb\source directory. For correct operation, and parity with the shell script, it needs to resolve to the build\tools\lldb\scripts directory. llvm-svn: 212760
1 parent 454955e commit 026861b

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

lldb/scripts/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ if ( LLDB_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION )
1818

1919
# Install the LLDB python module on all operating systems
2020
install(SCRIPT lldb_python_module.cmake -DCMAKE_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\" -DCMAKE_BUILD_DIR=\"${CMAKE_BUILD_DIR}\")
21+
22+
# Add a Post-Build Event to copy over Python files and create the symlink to liblldb.so for the Python API(hardlink on Windows)
23+
add_custom_command( TARGET liblldb
24+
POST_BUILD
25+
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/finishSwigWrapperClasses.py
26+
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Python/finishSwigPythonLLDB.py
27+
COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/finishSwigWrapperClasses.py -d "--srcRoot=${LLDB_SOURCE_DIR}" "--targetDir=${CMAKE_CURRENT_BINARY_DIR}" "--cfgBldDir=${CMAKE_CURRENT_BINARY_DIR}" "--prefix=${CMAKE_BINARY_DIR}" "--cmakeBuildConfiguration=${CMAKE_CFG_INTDIR}" -m
28+
COMMENT "Python script sym-linking LLDB Python API")
2129
else ()
2230
add_custom_command(
2331
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp

lldb/source/CMakeLists.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -327,16 +327,6 @@ endif ()
327327
# FIXME: implement svn/git revision and repository parsing solution on Windows. There is an SVN-only
328328
# revision parsing solution in tools/clang/lib/Basic/CMakelists.txt.
329329

330-
if ( LLDB_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION )
331-
# Add a Post-Build Event to copy over Python files and create the symlink to liblldb.so for the Python API(hardlink on Windows)
332-
if ( NOT LLDB_DISABLE_PYTHON )
333-
add_custom_command( TARGET liblldb
334-
POST_BUILD
335-
COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/finishSwigWrapperClasses.py "--srcRoot=${LLDB_SOURCE_DIR}" "--targetDir=${CMAKE_CURRENT_BINARY_DIR}" "--cfgBldDir=${CMAKE_CURRENT_BINARY_DIR}" "--prefix=${CMAKE_BINARY_DIR}" "--cmakeBuildConfiguration=${CMAKE_CFG_INTDIR}" -m
336-
COMMENT "Python script sym-linking LLDB Python API")
337-
endif ()
338-
endif ()
339-
340330
install(TARGETS liblldb
341331
RUNTIME DESTINATION bin
342332
LIBRARY DESTINATION lib

0 commit comments

Comments
 (0)