[Lldb-commits] [PATCH] D114465: [lldb] Move create_relative_symlink function up in CMake hierarchy
Dimitry Andric via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 23 13:00:15 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb5a927b972b2: [lldb] Move create_relative_symlink function up in CMake hierarchy (authored by dim).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114465/new/
https://reviews.llvm.org/D114465
Files:
lldb/bindings/CMakeLists.txt
lldb/bindings/python/CMakeLists.txt
Index: lldb/bindings/python/CMakeLists.txt
===================================================================
--- lldb/bindings/python/CMakeLists.txt
+++ lldb/bindings/python/CMakeLists.txt
@@ -52,20 +52,6 @@
WORKING_DIRECTORY ${working_dir})
endfunction()
-function(create_relative_symlink swig_target dest_file output_dir output_name)
- get_filename_component(dest_file ${dest_file} ABSOLUTE)
- get_filename_component(output_dir ${output_dir} ABSOLUTE)
- file(RELATIVE_PATH rel_dest_file ${output_dir} ${dest_file})
- if(CMAKE_HOST_UNIX)
- set(LLVM_LINK_OR_COPY create_symlink)
- else()
- set(LLVM_LINK_OR_COPY copy)
- endif()
- add_custom_command(TARGET ${swig_target} POST_BUILD VERBATIM
- COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} ${rel_dest_file} ${output_name}
- WORKING_DIRECTORY ${output_dir})
-endfunction()
-
function(finish_swig_python swig_target lldb_python_bindings_dir lldb_python_target_dir)
# Add a Post-Build Event to copy over Python files and create the symlink to
# liblldb.so for the Python API(hardlink on Windows).
Index: lldb/bindings/CMakeLists.txt
===================================================================
--- lldb/bindings/CMakeLists.txt
+++ lldb/bindings/CMakeLists.txt
@@ -31,6 +31,20 @@
${DARWIN_EXTRAS}
)
+function(create_relative_symlink swig_target dest_file output_dir output_name)
+ get_filename_component(dest_file ${dest_file} ABSOLUTE)
+ get_filename_component(output_dir ${output_dir} ABSOLUTE)
+ file(RELATIVE_PATH rel_dest_file ${output_dir} ${dest_file})
+ if(CMAKE_HOST_UNIX)
+ set(LLVM_LINK_OR_COPY create_symlink)
+ else()
+ set(LLVM_LINK_OR_COPY copy)
+ endif()
+ add_custom_command(TARGET ${swig_target} POST_BUILD VERBATIM
+ COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} ${rel_dest_file} ${output_name}
+ WORKING_DIRECTORY ${output_dir})
+endfunction()
+
if (LLDB_ENABLE_PYTHON)
add_subdirectory(python)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114465.389291.patch
Type: text/x-patch
Size: 1947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211123/d7046c91/attachment.bin>
More information about the lldb-commits
mailing list