This is an archive of the discontinued LLVM Phabricator instance.

[standalone-build-x86_64]: build lld
ClosedPublic

Authored by kwk on Jul 12 2022, 3:05 AM.

Details

Summary

This adds building lld to the standalone-build-x86_64 script.

Event Timeline

kwk created this revision.Jul 12 2022, 3:05 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added subscribers: jsji, pengfei. · View Herald Transcript
kwk requested review of this revision.Jul 12 2022, 3:05 AM
zorg/buildbot/builders/annotated/standalone-build.sh
87

looks redundant :-)

128

It basically means that lld currently does not build in standalone mode, correct?
What is the impact on the change below, It doesn't provide any actual file, is lld still functional in that setup?

kwk updated this revision to Diff 443903.Jul 12 2022, 3:26 AM
  • Remove redundant info
kwk marked an inline comment as done.Jul 12 2022, 4:05 AM
kwk added inline comments.
zorg/buildbot/builders/annotated/standalone-build.sh
128

lld during build time tries to resolve a path to an include file by going first to the llvm directory only to go back to ../ and then going into libunwind/include/. Indeed, this won't work in standalone build mode unless we checkout the llvm directory which is exactly what we don't want. But as a compromise I create an empty llvm dir so that at least the path resolve process does work without consuming files from this location. I can run lld and it outputs:

$~/llvm-build-standalone/install/lld/bin $ ./lld --help
lld is a generic driver.
Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld (WebAssembly) instead

I think it really is only the include path that is broken and there's an old PR by @tstellar that touches on this subject: https://reviews.llvm.org/D32595.

tstellar accepted this revision.Jul 26 2022, 1:09 AM
This revision is now accepted and ready to land.Jul 26 2022, 1:09 AM
This revision was automatically updated to reflect the committed changes.