forked from DarkCat09/docker-openj9-piped
fix: use lld and latest clang
This commit is contained in:
parent
0e5611083b
commit
f881e40484
1 changed files with 8 additions and 6 deletions
|
@ -5,10 +5,10 @@ FROM ubuntu:25.04 AS build
|
|||
RUN apt -qq update \
|
||||
&& apt -qq upgrade -y \
|
||||
&& apt -qq install -y --no-install-recommends \
|
||||
ant ant-contrib autoconf build-essential ca-certificates clang-19 cmake cpio curl execstack file git \
|
||||
ant ant-contrib autoconf build-essential ca-certificates clang cmake cpio curl execstack file git \
|
||||
libasound2-dev libcups2-dev libdwarf-dev libelf-dev libexpat1-dev libffi-dev libfontconfig libfontconfig1-dev \
|
||||
libfreetype6-dev libnuma-dev libssl-dev libx11-dev libxext-dev libxrandr-dev libxrender-dev libxt-dev libxtst-dev \
|
||||
make nasm pkg-config python3 python3-dev rsync systemtap-sdt-dev unzip wget xvfb zip zlib1g-dev unzip \
|
||||
lld make nasm pkg-config python3 python3-dev rsync systemtap-sdt-dev unzip wget xvfb zip zlib1g-dev unzip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /build
|
||||
|
@ -27,14 +27,16 @@ RUN git clone --single-branch --depth 1 \
|
|||
WORKDIR /build/src
|
||||
RUN bash get_source.sh
|
||||
|
||||
ENV CC=/usr/bin/clang-19 CXX=/usr/bin/clang++-19 \
|
||||
CFLAGS="-O3 -flto -fwhole-program-vtables" \
|
||||
LDFLAGS="-Wl,-O1"
|
||||
ENV CC=/usr/bin/clang CXX=/usr/bin/clang++ LD=/usr/bin/lld
|
||||
# TODO: add as args to configure
|
||||
# CFLAGS="-O3 -flto -fwhole-program-vtables" \
|
||||
# LDFLAGS="-Wl,-O1"
|
||||
RUN bash configure \
|
||||
--with-boot-jdk=/build/bootjdk \
|
||||
--with-openssl=system \
|
||||
--with-toolchain-type=clang \
|
||||
--enable-jvm-feature-link-time-opt
|
||||
--enable-jvm-feature-link-time-opt \
|
||||
--with-extra-ldflags="-fuse-ld=/usr/bin/lld"
|
||||
RUN make all JOBS=$(nproc)
|
||||
|
||||
# jlink by advice from https://adoptium.net/blog/2021/10/jlink-to-produce-own-runtime/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue