This is an archive of the discontinued LLVM Phabricator instance.

[LLDB] Remove standalone build dep on llvm-strip
ClosedPublic

Authored by gmittert on Oct 7 2019, 5:31 PM.

Details

Summary

When building standalone, since llvm-strip is a symlink, it is created
using add_custom_command/add_custom_target which cannot be exported, and
thus cannot be depended on by lldb.

Diff Detail

Event Timeline

gmittert created this revision.Oct 7 2019, 5:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2019, 5:31 PM
xiaobai added a subscriber: xiaobai.

@JDevlieghere has been touching similar things today. You should coordinate with him on this change.

lit/CMakeLists.txt
64 ↗(On Diff #223703)

why not if(TARGET llvm-strip)? I think that expresses the intent more cleanly (and conforms to the existing pattern).

JDevlieghere added inline comments.Oct 7 2019, 5:54 PM
lit/CMakeLists.txt
64 ↗(On Diff #223703)

I actually ran into an issue with that today, we had the following code in the top-level CMake list:

if(TARGET dsymutil)
    add_lldb_test_dependency(dsymutil)
  endif()

Nevertheless, ninja lldb-test-deps didn't build dsymutil.

$ /V/J/l/build-ra> ninja lldb-test-deps
[1/1] Python script sym-linking LLDB Python API
$ /V/J/l/build-ra> ninja dsymutil
[1/1] Linking CXX executable bin/dsymutil
kwk added a comment.Oct 8 2019, 5:44 AM

I think I'm guilty for adding llvm-strip to LLDB_TEST_DEPS I wasn't aware that it might cause problems.

compnerd added inline comments.Oct 8 2019, 8:42 AM
lit/CMakeLists.txt
64 ↗(On Diff #223703)

My slight preference for this is to actually have a good way to identify that this can be simplified once unified builds are the only supported build style. I suppose a comment along with the if(TARGET) check would work too.

gmittert updated this revision to Diff 223903.Oct 8 2019, 11:04 AM

Alright, rebased and added a comment to it

xiaobai accepted this revision.Oct 8 2019, 3:20 PM

LGTM

This revision is now accepted and ready to land.Oct 8 2019, 3:20 PM

Thanks! Can someone commit this for me?

gmittert updated this revision to Diff 224147.Oct 9 2019, 1:44 PM

Updated/Rebased for the rename of lit->test

gmittert updated this revision to Diff 224148.Oct 9 2019, 1:45 PM
This revision was automatically updated to reflect the committed changes.