8333189: Make sure clang on linux uses lld as linker

Reviewed-by: jiangli, erikj
This commit is contained in:
Magnus Ihse Bursie 2024-05-29 19:51:07 +00:00
parent c8eea59f50
commit 789ac8b276
4 changed files with 10 additions and 2 deletions

View File

@ -71,7 +71,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
LDFLAGS_CXX_PARTIAL_LINKING="$MACHINE_FLAG -r"
if test "x$OPENJDK_TARGET_OS" = xlinux; then
BASIC_LDFLAGS="-Wl,--exclude-libs,ALL"
BASIC_LDFLAGS="-fuse-ld=lld -Wl,--exclude-libs,ALL"
fi
if test "x$OPENJDK_TARGET_OS" = xaix; then
BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-bnolibpath -Wl,-bnoexpall \

View File

@ -0,0 +1,8 @@
SUNWprivate_1.1 {
global:
*;
local:
_fini;
_init;
};

View File

@ -154,7 +154,7 @@ ifeq ($(call isTargetOs, windows), true)
endif
ifeq ($(call isTargetOs, linux), true)
HOTSPOT_VERSION_SCRIPT := $(TOPDIR)/make/data/hotspot-symbols/version-script.txt
HOTSPOT_VERSION_SCRIPT := $(TOPDIR)/make/data/hotspot-symbols/version-script-$(TOOLCHAIN_TYPE).txt
JVM_LDFLAGS += -Wl,-version-script=$(HOTSPOT_VERSION_SCRIPT)
endif