hermes: upgrade to new base builder (#6447)

This commit is contained in:
DavidKorczynski 2021-09-15 15:04:54 +01:00 committed by GitHub
parent b6df1a5f5b
commit d863c4426a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 8 deletions

View File

@ -14,15 +14,18 @@
#
################################################################################
# Using Ubuntu 16.04 because of breakage on Ubuntu 20.04.
# See https://github.com/google/oss-fuzz/issues/6291 for more details.
FROM gcr.io/oss-fuzz-base/base-builder:xenial
# Delete line above and uncomment line below to upgrade to 20.04.
# FROM gcr.io/oss-fuzz-base/base-builder
FROM gcr.io/oss-fuzz-base/base-builder
RUN apt-get update && \
apt-get install -y make autoconf automake libtool wget libicu-dev \
ninja-build python zip libreadline-dev libatomic-ops-dev
apt-get install -y make autoconf automake libtool wget \
python zip libreadline-dev libatomic-ops-dev
RUN pip3 install meson ninja
RUN ln -s /usr/local/bin/ninja /usr/bin/ninja
RUN wget https://github.com/unicode-org/icu/archive/refs/tags/cldr/2021-08-25.tar.gz && \
tar xzvf ./2021-08-25.tar.gz && \
mv ./icu-cldr-2021-08-25/icu4c $SRC/icu
RUN git clone https://github.com/facebook/hermes.git
WORKDIR hermes
WORKDIR $SRC
COPY build.sh $SRC/

View File

@ -15,6 +15,23 @@
#
################################################################################
# build ICU for linking statically.
cd $SRC/icu/source
./configure --disable-shared --enable-static --disable-layoutex \
--disable-tests --disable-samples --with-data-packaging=static
make install -j$(nproc)
# Ugly ugly hack to get static linking to work for icu.
cd lib
ls *.a | xargs -n1 ar x
rm *.a
ar r libicu.a *.{ao,o}
ln -s $PWD/libicu.a /usr/lib/x86_64-linux-gnu/libicudata.a
ln -s $PWD/libicu.a /usr/lib/x86_64-linux-gnu/libicuuc.a
ln -s $PWD/libicu.a /usr/lib/x86_64-linux-gnu/libicui18n.a
cd $SRC/hermes
if [ "${SANITIZER}" = address ]
then
CONFIGURE_FLAGS="--enable-asan"