This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Creates _liblldb symlink from cmake
ClosedPublic

Authored by hhb on Oct 10 2019, 10:37 PM.

Details

Summary

This is another attempt of D67993.

This change removed hard coded relative paths. This way we can generate correct result when get_python_lib() returns a different path, or LLDB_PYTHON_RELATIVE_PATH is specified directly.

By moving things out of python, we are also able to correctly process more cross compile situations. E.g. .pyd vs .so for Windows.

Event Timeline

hhb updated this revision to Diff 224544.Oct 10 2019, 10:37 PM
hhb created this revision.

Fix format

Harbormaster completed remote builds in B39398: Diff 224544.
Harbormaster completed remote builds in B39399: Diff 224545.
hhb updated this revision to Diff 224546.Oct 10 2019, 10:43 PM

Remove tailing whitespace

hhb updated this revision to Diff 224647.Oct 11 2019, 11:52 AM

Fix file copy path

hhb updated this revision to Diff 224648.Oct 11 2019, 11:53 AM

Fix file copy path

Harbormaster completed remote builds in B39437: Diff 224648.
hhb updated this revision to Diff 224649.Oct 11 2019, 11:55 AM

Fix typo

hhb updated this revision to Diff 224707.Oct 11 2019, 4:23 PM

Adds VERBATIM

lldb/CMakeLists.txt
228

The problem is that for multi-configuration generators the current configuration cannot be evaluated at the configuring step i.e. you cannot just insert ${CMAKE_CFG_INTDIR} in the dest_file path and use it here. The variable should be expanded in the post-build command.

244

This command still produces a path without configuration name, Visual Studio failed to execute the post-build step.

@hhb, please, take a look. Slightly changed your patch to make it work for Visual Studio.

hhb planned changes to this revision.Oct 14 2019, 1:03 PM
hhb updated this revision to Diff 224954.Oct 14 2019, 9:32 PM

Fix the build for multi-config generator.

hhb updated this revision to Diff 224955.Oct 14 2019, 9:38 PM

Oops fix typo.

hhb marked 3 inline comments as done.Oct 14 2019, 10:27 PM
hhb added inline comments.
lldb/CMakeLists.txt
244

Thanks for testing and the patch! I found that CMAKE_CFG_INTDIR can actually be passed into function and expanded to $(Configure). At least in VS2019 community... Can you try this new version? Thanks again!

Build and installation completed successfully! LGTM, though it would be good if anyone tests this with Xcode.

This revision is now accepted and ready to land.Oct 15 2019, 6:51 AM
hhb marked an inline comment as done.Oct 15 2019, 10:49 AM

Build and installation completed successfully! LGTM, though it would be good if anyone tests this with Xcode.

I just tested Xcode. For xcode LLDB_BUILD_FRAMEWORK is on by default so that's what I did. Both release and debug build looks good. Obviously xcode did something different than VS...

This revision was automatically updated to reflect the committed changes.