From: sashiko-bot@kernel.org
To: "James Clark" <james.clark@linaro.org>
Cc: dmitry.torokhov@gmail.com, linux-perf-users@vger.kernel.org,
bpf@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH v2 5/6] tools/build: selftests: Allow versioning LLVM lld
Date: Mon, 18 May 2026 09:32:37 +0000 [thread overview]
Message-ID: <20260518093237.90640C2BCC6@smtp.kernel.org> (raw)
In-Reply-To: <20260518-james-perf-llvm-version-v2-5-f12cc4f031d8@linaro.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Empty USE_LD variable causes clang build failure in selftests when ld.lld is not in PATH.
--
commit 371ca22c55bb0fa6502ac06f7b33d63418ad16ff
Author: James Clark <james.clark@linaro.org>
tools/build: selftests: Allow versioning LLVM lld
This commit adds an LLD variable to Makefile.include to allow versioning of
LLVM's linker, keeping it consistent with the rest of the LLVM toolchain. It
modifies the BPF selftests Makefile to resolve the full path of the linker
using the command -v shell utility.
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index 6ef6872adbc3e..836e783f0170e 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
[ ... ]
> @@ -245,9 +245,9 @@ $(OUTPUT)/%:%.c
>
> # LLVM's ld.lld doesn't support all the architectures, so use it only on x86
> ifeq ($(SRCARCH),$(filter $(SRCARCH),x86 riscv))
> -LLD := lld
> +USE_LD := $(shell command -v $(LLD))
Does this cause the build to fail if the toolchain directory is not in the
system PATH?
If a user explicitly specifies the compiler using an absolute path like
CLANG=/path/to/clang, but does not add the toolchain directory to their PATH,
the command -v utility will return an empty string.
This would cause USE_LD to be empty, leading to a malformed argument like
-fuse-ld= being passed to clang later in the Makefile, which then fails with
an invalid linker name error.
Previously, passing the hardcoded lld allowed clang to natively resolve the
linker relative to its own binary location. Is there a way to support both
versioned linker names and absolute compiler paths without relying entirely
on the system PATH?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260518-james-perf-llvm-version-v2-0-f12cc4f031d8@linaro.org?part=5
next prev parent reply other threads:[~2026-05-18 9:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 9:03 [PATCH v2 0/6] tools/build: Allow versioning of all LLVM tools James Clark
2026-05-18 9:03 ` [PATCH v2 1/6] tools/build: Allow versioning of all LLVM tools defined in Makefile.include James Clark
2026-05-18 9:03 ` [PATCH v2 2/6] tools/build: Indent if else blocks James Clark
2026-05-18 9:03 ` [PATCH v2 3/6] selftests: Remove unused LLD variable James Clark
2026-05-21 15:30 ` Benjamin Tissoires
2026-05-18 9:03 ` [PATCH v2 4/6] tools/build: Allow versioning LLVM readelf James Clark
2026-05-18 16:05 ` Ian Rogers
2026-05-18 9:03 ` [PATCH v2 5/6] tools/build: selftests: Allow versioning LLVM lld James Clark
2026-05-18 9:32 ` sashiko-bot [this message]
2026-05-18 9:47 ` James Clark
2026-05-20 19:50 ` Arnaldo Carvalho de Melo
2026-05-21 13:16 ` James Clark
2026-05-18 9:03 ` [PATCH v2 6/6] tools/build: selftests: Remove some duplicate toolchain definitions James Clark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260518093237.90640C2BCC6@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=james.clark@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox