Page MenuHomeFreeBSD

tools/build: Include build tool symlink targets
Needs ReviewPublic

Authored by emaste on Tue, Jun 23, 2:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jul 18, 7:09 AM
Unknown Object (File)
Tue, Jul 14, 11:08 PM
Unknown Object (File)
Tue, Jul 14, 6:47 PM
Unknown Object (File)
Mon, Jul 6, 12:03 AM
Unknown Object (File)
Mon, Jul 6, 12:00 AM
Unknown Object (File)
Sat, Jul 4, 7:04 AM
Unknown Object (File)
Sat, Jul 4, 4:20 AM
Unknown Object (File)
Sat, Jul 4, 4:18 AM

Details

Reviewers
imp
jrtc27
Group Reviewers
build
Summary
After commit 2b619b7c7b53 ("Merge commit 93a67259cf23 from llvm git (by
ShengYi Hung):") Clang invokes ld.lld, but we were not copying it into
the build tools tree.

Extend the host-symlinks toolchain tools logic to check if the tool is a
symlink, and if so invoke ${_WRAP_HOST_TOOL} on the symlink target as
well.

This is more general than having a special-case just for ld.lld, but I
did not want to change the entire host-symlinks target.  A future
project could move this logic into a shell or flua script helper.

Event:          Halifax Hackathon 2020606
Sponsored by:   The FreeBSD Foundation

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste created this revision.
emaste added subscribers: jrtc27, dim, aokblast.

(This caused BUILD_WITH_STRICT_TMPPATH builds to fail.)

Hm. If the link is absolute, we definitely don't need to do anything to it, and if the link is relative, well, who knows? We might already be linking it, copying it, adding our own wrapper, etc.

There's also a bit of a mismatch here now. bmake thinks (X)LD is ld, but clang thinks it's ld.lld.

Alternately we could just add ld.lld to _toolchain_tools_to_symlink

You can't unconditionally add it though. For XLD it's probably ok to just check whether it's "ld" or not, but for LD I don't know what the right thing to do is.

Maybe for now it should just be "if ${_tool} is ld and a relative symlink to the same directory then wrap that too"?

Yes, not unconditionally. I'd want to add it in _toolchain_tools_to_symlink though.

Detect symlink in _toolchain_tools_to_symlink loop and add symlink target also.

tools/build/Makefile
476

Oh, should also check for dups

@jrtc27 are you fine with this approach?