Skip to content

Commit 789ac8b

Browse files
committed
8333189: Make sure clang on linux uses lld as linker
Reviewed-by: jiangli, erikj
1 parent c8eea59 commit 789ac8b

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

make/autoconf/flags-ldflags.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
7171
LDFLAGS_CXX_PARTIAL_LINKING="$MACHINE_FLAG -r"
7272
7373
if test "x$OPENJDK_TARGET_OS" = xlinux; then
74-
BASIC_LDFLAGS="-Wl,--exclude-libs,ALL"
74+
BASIC_LDFLAGS="-fuse-ld=lld -Wl,--exclude-libs,ALL"
7575
fi
7676
if test "x$OPENJDK_TARGET_OS" = xaix; then
7777
BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-bnolibpath -Wl,-bnoexpall \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
SUNWprivate_1.1 {
2+
global:
3+
*;
4+
5+
local:
6+
_fini;
7+
_init;
8+
};

make/hotspot/lib/CompileJvm.gmk

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ ifeq ($(call isTargetOs, windows), true)
154154
endif
155155

156156
ifeq ($(call isTargetOs, linux), true)
157-
HOTSPOT_VERSION_SCRIPT := $(TOPDIR)/make/data/hotspot-symbols/version-script.txt
157+
HOTSPOT_VERSION_SCRIPT := $(TOPDIR)/make/data/hotspot-symbols/version-script-$(TOOLCHAIN_TYPE).txt
158158

159159
JVM_LDFLAGS += -Wl,-version-script=$(HOTSPOT_VERSION_SCRIPT)
160160
endif

0 commit comments

Comments
 (0)