Skip to content

Commit e90153f

Browse files
author
duke
committed
Backport 0935ba9a8c808d372b387d0d0f479f854c121ec1
1 parent 48f11a4 commit e90153f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

make/autoconf/toolchain.m4

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -620,6 +620,13 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
620620
# All other toolchains use the compiler to link.
621621
LD="$CC"
622622
LDCXX="$CXX"
623+
# Force use of lld, since that is what we expect when setting flags later on
624+
if test "x$TOOLCHAIN_TYPE" = xclang; then
625+
if test "x$OPENJDK_BUILD_OS" != "xmacosx"; then
626+
LD="$LD -fuse-ld=lld"
627+
LDCXX="$LDCXX -fuse-ld=lld"
628+
fi
629+
fi
623630
fi
624631
AC_SUBST(LD)
625632
# FIXME: it should be CXXLD, according to standard (cf CXXCPP)

0 commit comments

Comments
 (0)