RFR: 8343883: Cannot resolve user specified toolchain-path for lld after JDK-8338304 [v2]

SendaoYan syan at openjdk.org
Tue Nov 12 17:21:20 UTC 2024


On Tue, 12 Nov 2024 17:14:53 GMT, SendaoYan <syan at openjdk.org> wrote:

>> make/autoconf/flags-ldflags.m4 line 77:
>> 
>>> 75:       BASIC_LDFLAGS="-fuse-ld=lld -Wl,--exclude-libs,ALL"
>>> 76:       if test "x$CXX_IS_USER_SUPPLIED" = xfalse && test "x$CC_IS_USER_SUPPLIED" = xfalse; then
>>> 77:         UTIL_REQUIRE_PROGS(LLD, lld, $TOOLCHAIN_PATH:$PATH)
>> 
>> Actually, I am not 100% sure that this will work if $TOOLCHAIN_PATH is empty. You need to check that. If not, this should probably be fixed in UTIL_CHECK_PROGS instead to allow for that, since this is a more elegant solution if empty path values are allowed.
>
> The call tree is UTIL_REQUIRE_PROGS -> UTIL_LOOKUP_PROGS. The `UTIL_LOOKUP_PROGS` seems have deal with empty path. 
> https://github.com/openjdk/jdk/blob/master/make/autoconf/util_paths.m4#L404
> And I have verify both set `$TOOLCHAIN_PATH` and unset `$TOOLCHAIN_PATH` locally.

Have lld in `$PATH` but not in `$TOOLCHAIN_PATH` works normal.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21999#discussion_r1838494636


More information about the build-dev mailing list