Skip to content

Conversation

@Meczka
Copy link

@Meczka Meczka commented Feb 23, 2023

This PR enables python scripting support in lldb.
New package python3-lldb-14 is added and now lldb-14 depends on it.
swig and python3 is required to build llvm.

Build tested on macOS 12 host for iOS 15.1.

Version: @DEB_LLVM_V@
Architecture: @DEB_ARCH@
Maintainer: @DEB_MAINTAINER@
Depends: python3.9 (= 3.9.9-1), libpython3.9 (= 3.9.9-1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Depends: python3.9 (= 3.9.9-1), libpython3.9 (= 3.9.9-1)
Depends: python3.9, libpython3.9


#llvm.mk Prep python3-lldb-$(LLVM_MAJOR_V)
mkdir -p $(BUILD_DIST)/python3-lldb-$(LLVM_MAJOR_V)/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/local/lib/python3.9/dist-packages
cp -a $(BUILD_STAGE)/llvm/opt/procursus/bin/python3/. $(BUILD_DIST)/python3-lldb-$(LLVM_MAJOR_V)/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/local/lib/python3.9/dist-packages/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem correct...
Won't this break on rootless and stuff?

Copy link
Contributor

@TheRealKeto TheRealKeto Mar 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They just didn't use the prefix variables. I don't like that period though.

Suggested change
cp -a $(BUILD_STAGE)/llvm/opt/procursus/bin/python3/. $(BUILD_DIST)/python3-lldb-$(LLVM_MAJOR_V)/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/local/lib/python3.9/dist-packages/
cp -a $(BUILD_STAGE)/llvm/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin/python3/. $(BUILD_DIST)/python3-lldb-$(LLVM_MAJOR_V)/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/python3.9/dist-packages/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it copying from bin to local/lib???

$(LN_S) libLLVM.dylib $(BUILD_DIST)/libllvm$(LLVM_MAJOR_V)/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/llvm-$(LLVM_MAJOR_V)/lib/libLLVM-$(LLVM_MAJOR_V).dylib

#llvm.mk Prep python3-lldb-$(LLVM_MAJOR_V)
mkdir -p $(BUILD_DIST)/python3-lldb-$(LLVM_MAJOR_V)/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)$(MEMO_ALT_PREFIX)/lib/python$(PYTHON3_MAJOR_V)/dist-packages
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mkdir -p $(BUILD_DIST)/python3-lldb-$(LLVM_MAJOR_V)/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)$(MEMO_ALT_PREFIX)/lib/python$(PYTHON3_MAJOR_V)/dist-packages
mkdir -p $(BUILD_DIST)/python3-lldb-$(LLVM_MAJOR_V)/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/python3/dist-packages

@Meczka Meczka requested a review from CRKatri April 20, 2023 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants