Update to Mono 6.12.0.102, use Fedora 32

- Base container: Fedora 32
- Mono uses version 6.12.0.102, MSBuild 16.6
- Linux builds use GCC 9
- Windows builds use Fedora 32's mingw-gcc (GCC 9)
- JavaScript uses Emscripten 1.39.9 (Mono 6.12 requires 1.39.7 but that version
  fails generating .wasm, so we backport a patch to get 1.39.9)
- Install SCons 4.0.1 from pip
This commit is contained in:
Rémi Verschelde
2020-10-13 17:06:37 +02:00
parent 8b2f41062b
commit dede88afa4
15 changed files with 107 additions and 284 deletions

View File

@@ -1,9 +1,10 @@
FROM fedora:31
FROM fedora:32
WORKDIR /root
RUN dnf -y upgrade --setopt=install_weak_deps=False && \
dnf -y install --setopt=install_weak_deps=False \
bash bzip2 curl git make patch pkgconfig python3 scons unzip which xz
bash bzip2 curl git make nano patch pkgconfig python-unversioned-command python3-pip unzip which xz && \
pip install scons==4.0.1
CMD /bin/bash

View File

@@ -30,7 +30,7 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
patch -p1 < /root/files/patches/mono-xcode-allow-weak-import.patch && \
patch -p1 < /root/files/patches/mono-sys-uio-fix-preadv-misdetection.patch && \
cd godot-mono-builds && \
sed -i ios.py -e '/no_weak_imports/d' && \
export DISABLE_NO_WEAK_IMPORTS=1 && \
export MONO_SOURCE_ROOT=/root/${mono_version} && \
python3 ios.py configure -j --verbose --target=arm64 --ios-toolchain ${IOSCROSS_ROOT}/arm64 --ios-sdk ${IOSCROSS_ROOT}/arm64/SDK/iPhoneOS14.0.sdk --osx-toolchain ${OSXCROSS_ROOT} && \
python3 ios.py make -j --verbose --target=arm64 && \

View File

@@ -5,20 +5,20 @@ ARG mono_version
RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \
dnf -y install --setopt=install_weak_deps=False \
java-openjdk yasm && \
java-openjdk && \
git clone --progress https://github.com/emscripten-core/emsdk && \
cd emsdk && \
git checkout a5082b232617c762cb65832429f896c838df2483 && \
./emsdk install 1.38.47-upstream && \
./emsdk activate 1.38.47-upstream && \
echo "source /root/emsdk/emsdk_env.sh" >> /root/.bashrc
RUN cp -a /root/files/${mono_version} /root && \
git checkout 1.39.9 && \
./emsdk install 1.39.9 && \
./emsdk activate 1.39.9 && \
echo "source /root/emsdk/emsdk_env.sh" >> /root/.bashrc && \
source /root/emsdk/emsdk_env.sh && \
cp -a /root/files/${mono_version} /root && \
cd /root/${mono_version} && \
patch -p1 < /root/files/patches/mono-pr16636-wasm-bugfix-and-update.diff && \
patch -p1 < /root/files/patches/mono-pr17094-bump-emscripten-1.38.46.patch && \
patch -p1 < /root/files/patches/mono-emscripten-1.39.9.patch && \
export MONO_SOURCE_ROOT=/root/${mono_version} && \
cd /root/${mono_version}/godot-mono-builds && \
sed -i patch_emscripten.py -e "/emscripten-pr-8457.diff/d" && \
python3 patch_emscripten.py && \
python3 wasm.py configure -j --target=runtime && \
python3 wasm.py make -j --target=runtime && \

View File

@@ -5,20 +5,21 @@ ARG mono_version
RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
dnf -y install --setopt=install_weak_deps=False \
autoconf automake cmake gcc gcc-c++ gettext libtool perl python && \
gcc gcc-c++ make yasm \
autoconf automake cmake gettext libtool perl && \
cp -a /root/files/${mono_version} /root && \
cd /root/${mono_version} && \
NOCONFIGURE=1 ./autogen.sh && \
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib/mono --disable-boehm && \
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib/mono --disable-boehm --host=x86_64-linux-gnu && \
make -j && \
make install && \
cd /root && \
rm -rf /root/${mono_version} && \
cert-sync /etc/pki/tls/certs/ca-bundle.crt && \
rpm -ivh --nodeps \
https://download.mono-project.com/repo/centos8-stable/m/msbuild/msbuild-16.3+xamarinxplat.2019.08.08.00.55-0.xamarin.2.epel8.noarch.rpm \
https://download.mono-project.com/repo/centos8-stable/m/msbuild/msbuild-16.6+xamarinxplat.2020.04.29.14.43-0.xamarin.6.epel8.noarch.rpm \
https://download.mono-project.com/repo/centos8-stable/m/msbuild/msbuild-sdkresolver-16.6+xamarinxplat.2020.04.29.14.43-0.xamarin.6.epel8.noarch.rpm \
https://download.mono-project.com/repo/centos8-stable/m/msbuild-libhostfxr/msbuild-libhostfxr-3.0.0.2019.04.16.02.13-0.xamarin.4.epel8.x86_64.rpm \
https://download.mono-project.com/repo/centos8-stable/m/msbuild/msbuild-sdkresolver-16.3+xamarinxplat.2019.08.08.00.55-0.xamarin.2.epel8.noarch.rpm \
https://download.mono-project.com/repo/centos8-stable/n/nuget/nuget-5.2.0.6090.bin-0.xamarin.1.epel8.noarch.rpm
https://download.mono-project.com/repo/centos8-stable/n/nuget/nuget-5.6.0.6489.bin-0.xamarin.1.epel8.noarch.rpm
CMD /bin/bash

View File

@@ -36,10 +36,10 @@ RUN cp -a /root/files/${mono_version} /root && \
make -j && \
make install && \
cd /root && \
rm -f /root/dependencies/mono/bin/mono /root/dependencies/mono/bin/mono-sgen && \
rm -rf /root/dependencies/mono/bin/mono{,-sgen} /root/dependencies/mono/lib/mono && \
ln -s /usr/bin/mono /root/dependencies/mono/bin/mono && \
ln -s /usr/bin/mono-sgen /root/dependencies/mono/bin/mono-sgen && \
ln -sf /usr/lib/mono/* /root/dependencies/mono/lib/mono && \
ln -s /usr/lib/mono /root/dependencies/mono/lib/mono && \
mkdir -p /root/dependencies/mono/etc && \
cp -rvp /etc/mono /root/dependencies/mono/etc/ && \
cp /root/files/mono-config-macosx /root/dependencies/mono/etc/mono/config && \

View File

@@ -13,12 +13,12 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
apt-get -y update && \
apt-get -y install --no-install-recommends \
autoconf automake bzip2 cmake curl gettext git libtool make perl scons xz-utils \
gcc-8 g++-8 libudev-dev libx11-dev libxcursor-dev libxrandr-dev libasound2-dev libpulse-dev \
gcc-9 g++-9 libudev-dev libx11-dev libxcursor-dev libxrandr-dev libasound2-dev libpulse-dev \
libgl1-mesa-dev libglu1-mesa-dev libxi-dev libxinerama-dev yasm && \
ln -sf /usr/bin/gcc-ranlib-8 /usr/bin/gcc-ranlib && \
ln -sf /usr/bin/gcc-ar-8 /usr/bin/gcc-ar && \
ln -sf /usr/bin/gcc-8 /usr/bin/gcc && \
ln -sf /usr/bin/g++-8 /usr/bin/g++
ln -sf /usr/bin/gcc-ranlib-9 /usr/bin/gcc-ranlib && \
ln -sf /usr/bin/gcc-ar-9 /usr/bin/gcc-ar && \
ln -sf /usr/bin/gcc-9 /usr/bin/gcc && \
ln -sf /usr/bin/g++-9 /usr/bin/g++
RUN cp -a /root/files/${mono_version} /root && \
cd /root/${mono_version} && \
@@ -29,10 +29,10 @@ RUN cp -a /root/files/${mono_version} /root && \
cd /root && \
rm -rf /root/${mono_version} && \
cert-sync /etc/ssl/certs/ca-certificates.crt && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/c/core-setup/msbuild-libhostfxr_3.0.0.2019.04.16.02.13-0xamarin3+ubuntu1604b1_i386.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild-sdkresolver_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/n/nuget/nuget_5.2.0.6090.bin-0xamarin1+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild_16.6+xamarinxplat.2020.04.29.14.43-0xamarin5+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/c/core-setup/msbuild-libhostfxr_3.0.0.2019.04.16.02.13-0xamarin4+ubuntu1604b1_i386.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild-sdkresolver_16.6+xamarinxplat.2020.04.29.14.43-0xamarin5+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/n/nuget/nuget_5.5.0.6382.bin-0xamarin1+ubuntu1604b1_all.deb && \
dpkg -i --force-all *.deb && \
sed -i '/Depends.*mono/d' /var/lib/dpkg/status && \
ln -s /usr/bin/mono /usr/bin/cli && \

View File

@@ -13,12 +13,12 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
apt-get -y update && \
apt-get -y install --no-install-recommends \
autoconf automake bzip2 cmake curl gettext git libtool make perl scons xz-utils \
gcc-8 g++-8 libudev-dev libx11-dev libxcursor-dev libxrandr-dev libasound2-dev libpulse-dev \
gcc-9 g++-9 libudev-dev libx11-dev libxcursor-dev libxrandr-dev libasound2-dev libpulse-dev \
libgl1-mesa-dev libglu1-mesa-dev libxi-dev libxinerama-dev yasm && \
ln -sf /usr/bin/gcc-ranlib-8 /usr/bin/gcc-ranlib && \
ln -sf /usr/bin/gcc-ar-8 /usr/bin/gcc-ar && \
ln -sf /usr/bin/gcc-8 /usr/bin/gcc && \
ln -sf /usr/bin/g++-8 /usr/bin/g++
ln -sf /usr/bin/gcc-ranlib-9 /usr/bin/gcc-ranlib && \
ln -sf /usr/bin/gcc-ar-9 /usr/bin/gcc-ar && \
ln -sf /usr/bin/gcc-9 /usr/bin/gcc && \
ln -sf /usr/bin/g++-9 /usr/bin/g++
RUN cp -a /root/files/${mono_version} /root && \
cd /root/${mono_version} && \
@@ -29,10 +29,10 @@ RUN cp -a /root/files/${mono_version} /root && \
cd /root && \
rm -rf /root/${mono_version} && \
cert-sync /etc/ssl/certs/ca-certificates.crt && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/c/core-setup/msbuild-libhostfxr_3.0.0.2019.04.16.02.13-0xamarin3+ubuntu1604b1_amd64.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild-sdkresolver_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/n/nuget/nuget_5.2.0.6090.bin-0xamarin1+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild_16.6+xamarinxplat.2020.04.29.14.43-0xamarin5+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/c/core-setup/msbuild-libhostfxr_3.0.0.2019.04.16.02.13-0xamarin4+ubuntu1604b1_amd64.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild-sdkresolver_16.6+xamarinxplat.2020.04.29.14.43-0xamarin5+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/n/nuget/nuget_5.5.0.6382.bin-0xamarin1+ubuntu1604b1_all.deb && \
dpkg -i --force-all *.deb && \
sed -i '/Depends.*mono/d' /var/lib/dpkg/status && \
ln -s /usr/bin/mono /usr/bin/cli && \

View File

@@ -5,7 +5,7 @@ ARG mono_version
RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
dnf -y install --setopt=install_weak_deps=False \
mingw32-gcc mingw32-gcc-c++ mingw32-winpthreads-static mingw64-gcc mingw64-gcc-c++ mingw64-winpthreads-static yasm wine && \
mingw32-gcc mingw32-gcc-c++ mingw32-winpthreads-static mingw64-gcc mingw64-gcc-c++ mingw64-winpthreads-static wine && \
cp -a /root/files/${mono_version} /root && \
cd /root/${mono_version} && \
patch -p1 < /root/files/patches/wine-mono.patch && \

View File

@@ -39,7 +39,7 @@ mono_commit_str=
if [ ! -z "$3" -a ! -z "$4" ]; then
mono_version=$3
mono_commit=$4
mono_commit_str="-${mono_commit:0:6}"
mono_commit_str="-${mono_commit:0:7}"
fi
# If mono branch does not start with mono-, prepend it to the folder name.
@@ -88,7 +88,7 @@ if [ ! -e ${mono_root} ]; then
# Set up godot-mono-builds in tree
git clone --progress https://github.com/godotengine/godot-mono-builds
pushd godot-mono-builds
git checkout 562afa310ef78974b2986154220e26f58e83a72e
git checkout b4c77dcfb6f38f660e73f60c4ae03e11173ac8fd
export MONO_SOURCE_ROOT=${mono_root}
python3 patch_mono.py
popd

View File

@@ -1,27 +0,0 @@
diff -u a/tools/gen_sdk_package_darling_dmg.sh b/tools/gen_sdk_package_darling_dmg.sh
--- a/tools/gen_sdk_package_darling_dmg.sh 2018-12-20 16:06:04.744507679 +0000
+++ b/tools/gen_sdk_package_darling_dmg.sh 2018-12-20 16:06:39.000379232 +0000
@@ -33,22 +33,6 @@
[ -n "$CC" ] && require $CC
[ -n "$CXX" ] && require $CXX
-set +e
-
-command -v lsb_release 2>&1 > /dev/null
-
-if [[ $? -eq 0 ]] && [[ -n $(lsb_release -a 2>&1 | grep -i ubuntu) ]]; then
- echo "Using ubuntu, skipping fuse module check"
-else
- modinfo fuse &>/dev/null
-fi
-
-if [ $? -ne 0 ]; then
- echo "Required kernel module 'fuse' not loaded" 1>&2
- echo "Please run 'insmod fuse' as root" 1>&2
- exit 1
-fi
-
set -e
pushd $BUILD_DIR &>/dev/null

View File

@@ -1,12 +0,0 @@
--- a/configure.ac 2018-12-21 00:49:33.868510477 +0100
+++ b/configure.ac 2018-12-21 00:50:16.784397647 +0100
@@ -3172,6 +3172,8 @@
AC_MSG_CHECKING(for shm_open that works well enough with mmap)
if test "x$ac_cv_func_shm_open" = "xno" -o "x$ac_cv_func_shm_open_working_with_mmap" = "xno" ; then
AC_MSG_RESULT(no)
+ elif test "x$cross_compiling" = "xyes"; then
+ AC_MSG_RESULT(cross compiling, assuming yes)
else
AC_TRY_RUN([
#include <sys/mman.h>

View File

@@ -0,0 +1,58 @@
From 8daffc3e4c562560f9e5c4d643bc38e5350eff31 Mon Sep 17 00:00:00 2001
From: Zoltan Varga <vargaz@gmail.com>
Date: Sun, 8 Mar 2020 00:16:18 -0500
Subject: [PATCH] Bump emscripten to 1.39.9. (#19147)
---
sdks/builds/emscripten-pr-8457.diff | 20 --------------------
sdks/builds/wasm.mk | 3 +--
2 files changed, 1 insertion(+), 22 deletions(-)
delete mode 100644 sdks/builds/emscripten-pr-8457.diff
diff --git a/sdks/builds/emscripten-pr-8457.diff b/sdks/builds/emscripten-pr-8457.diff
deleted file mode 100644
index 3a03bf669ec8..000000000000
--- a/sdks/builds/emscripten-pr-8457.diff
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/emcc.py 2019-08-13 20:07:34.000000000 -0500
-+++ b/emcc.py 2019-08-27 08:05:39.000000000 -0500
-@@ -915,7 +918,7 @@
- file_suffix = get_file_suffix(arg)
- if file_suffix in SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + ASSEMBLY_ENDINGS + HEADER_ENDINGS or shared.Building.is_ar(arg): # we already removed -o <target>, so all these should be inputs
- newargs[i] = ''
-- if file_suffix.endswith(SOURCE_ENDINGS):
-+ if file_suffix.endswith(SOURCE_ENDINGS) or (has_dash_c and file_suffix.endswith(OBJECT_FILE_ENDINGS)):
- input_files.append((i, arg))
- has_source_inputs = True
- elif file_suffix.endswith(HEADER_ENDINGS):
-@@ -1838,7 +1840,7 @@
- # First, generate LLVM bitcode. For each input file, we get base.o with bitcode
- for i, input_file in input_files:
- file_ending = get_file_suffix(input_file)
-- if file_ending.endswith(SOURCE_ENDINGS):
-+ if file_ending.endswith(SOURCE_ENDINGS) or (has_dash_c and file_ending.endswith(OBJECT_FILE_ENDINGS)):
- compile_source_file(i, input_file)
- else: # bitcode
- if file_ending.endswith(BITCODE_ENDINGS):
diff --git a/sdks/builds/wasm.mk b/sdks/builds/wasm.mk
index 520e04c48cbc..53ed93cc0c8c 100644
--- a/sdks/builds/wasm.mk
+++ b/sdks/builds/wasm.mk
@@ -1,7 +1,7 @@
#emcc has lots of bash'isms
SHELL:=/bin/bash
-EMSCRIPTEN_VERSION=1.39.7
+EMSCRIPTEN_VERSION=1.39.9
EMSCRIPTEN_LOCAL_SDK_DIR=$(TOP)/sdks/builds/toolchains/emsdk
EMSCRIPTEN_SDK_DIR ?= $(EMSCRIPTEN_LOCAL_SDK_DIR)
@@ -29,7 +29,6 @@ $(EMSCRIPTEN_SDK_DIR)/.emscripten: | $(EMSCRIPTEN_SDK_DIR)
cd $(TOP)/sdks/builds/toolchains/emsdk && ./emsdk install $(EMSCRIPTEN_VERSION)
cd $(TOP)/sdks/builds/toolchains/emsdk && ./emsdk activate --embedded $(EMSCRIPTEN_VERSION)
cd $(TOP)/sdks/builds/toolchains/emsdk/upstream/emscripten && (patch -N -p1 < $(TOP)/sdks/builds/fix-emscripten-8511.diff; exit 0)
- cd $(TOP)/sdks/builds/toolchains/emsdk/upstream/emscripten && (patch -N -p1 < $(TOP)/sdks/builds/emscripten-pr-8457.diff; exit 0)
touch $@
.PHONY: provision-wasm

View File

@@ -1,144 +0,0 @@
diff --git a/mono/utils/mono-threads-wasm.c b/mono/utils/mono-threads-wasm.c
index 687e6c4c93e7..c61d800f4be2 100644
--- a/mono/utils/mono-threads-wasm.c
+++ b/mono/utils/mono-threads-wasm.c
@@ -145,10 +145,10 @@ mono_threads_platform_yield (void)
void
mono_threads_platform_get_stack_bounds (guint8 **staddr, size_t *stsize)
{
+ int tmp;
#ifdef __EMSCRIPTEN_PTHREADS__
pthread_attr_t attr;
gint res;
- int tmp;
*staddr = NULL;
*stsize = (size_t)-1;
@@ -173,13 +173,13 @@ mono_threads_platform_get_stack_bounds (guint8 **staddr, size_t *stsize)
*staddr = (guint8*)wasm_get_stack_base ();
*stsize = wasm_get_stack_size ();
}
-
- g_assert (&tmp > *staddr);
- g_assert (&tmp < (char*)*staddr + *stsize);
#else
*staddr = (guint8*)wasm_get_stack_base ();
*stsize = wasm_get_stack_size ();
#endif
+
+ g_assert ((guint8*)&tmp > *staddr);
+ g_assert ((guint8*)&tmp < (guint8*)*staddr + *stsize);
}
gboolean
diff --git a/mono/utils/mono-threads.c b/mono/utils/mono-threads.c
index 546704ff9e8f..bf73e01c7970 100644
--- a/mono/utils/mono-threads.c
+++ b/mono/utils/mono-threads.c
@@ -1569,8 +1569,10 @@ mono_thread_info_get_stack_bounds (guint8 **staddr, size_t *stsize)
/* Sanity check the result */
g_assert ((current > *staddr) && (current < *staddr + *stsize));
+#ifndef TARGET_WASM
/* When running under emacs, sometimes staddr is not aligned to a page size */
*staddr = (guint8*)((gssize)*staddr & ~(mono_pagesize () - 1));
+#endif
}
gboolean
diff --git a/scripts/ci/run-jenkins.sh b/scripts/ci/run-jenkins.sh
index 514d869e3768..e65076cbb827 100755
--- a/scripts/ci/run-jenkins.sh
+++ b/scripts/ci/run-jenkins.sh
@@ -330,7 +330,7 @@ if [[ ${CI_TAGS} == *'webassembly'* ]] || [[ ${CI_TAGS} == *'wasm'* ]];
if [[ ${CI_TAGS} == *'debug'* ]]; then
echo "CONFIGURATION=debug" >> sdks/Make.config
fi
- echo "ENABLE_WASM_THREADS=1" >> sdks/Make.config
+ #echo "ENABLE_WASM_THREADS=1" >> sdks/Make.config
export aot_test_suites="System.Core"
export mixed_test_suites="System.Core"
@@ -359,7 +359,7 @@ if [[ ${CI_TAGS} == *'webassembly'* ]] || [[ ${CI_TAGS} == *'wasm'* ]];
# disable for now until https://github.com/mono/mono/pull/13622 goes in
#${TESTCMD} --label=debugger --timeout=20m $gnumake -C sdks/wasm test-debugger
${TESTCMD} --label=browser --timeout=20m $gnumake -C sdks/wasm run-browser-tests
- ${TESTCMD} --label=browser-threads --timeout=20m $gnumake -C sdks/wasm run-browser-threads-tests
+ #${TESTCMD} --label=browser-threads --timeout=20m $gnumake -C sdks/wasm run-browser-threads-tests
${TESTCMD} --label=v8-corlib --timeout=20m $gnumake -C sdks/wasm run-v8-corlib
${TESTCMD} --label=aot-mini --timeout=20m $gnumake -j ${CI_CPU_COUNT} -C sdks/wasm run-aot-mini
${TESTCMD} --label=build-aot-all --timeout=20m $gnumake -j ${CI_CPU_COUNT} -C sdks/wasm build-aot-all
diff --git a/sdks/builds/emscripten-pr-8457.diff b/sdks/builds/emscripten-pr-8457.diff
index 0f051a914551..360af836be69 100644
--- a/sdks/builds/emscripten-pr-8457.diff
+++ b/sdks/builds/emscripten-pr-8457.diff
@@ -1,8 +1,6 @@
-diff --git a/emcc.py b/emcc.py
-index c241f396a..1fcffc993 100755
---- a/emcc.py
-+++ b/emcc.py
-@@ -844,6 +844,9 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR P
+--- a/emcc.py 2019-08-13 20:07:34.000000000 -0500
++++ b/emcc.py 2019-08-27 08:05:39.000000000 -0500
+@@ -890,6 +890,9 @@
lib_dirs = [shared.path_from_root('system', 'local', 'lib'),
shared.path_from_root('system', 'lib')]
@@ -12,7 +10,7 @@ index c241f396a..1fcffc993 100755
# find input files this a simple heuristic. we should really analyze
# based on a full understanding of gcc params, right now we just assume that
# what is left contains no more |-x OPT| things
-@@ -869,7 +872,7 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR P
+@@ -915,7 +918,7 @@
file_suffix = get_file_suffix(arg)
if file_suffix in SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + ASSEMBLY_ENDINGS + HEADER_ENDINGS or shared.Building.is_ar(arg): # we already removed -o <target>, so all these should be inputs
newargs[i] = ''
@@ -21,16 +19,15 @@ index c241f396a..1fcffc993 100755
input_files.append((i, arg))
has_source_inputs = True
elif file_suffix.endswith(HEADER_ENDINGS):
-@@ -938,8 +941,6 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR P
+@@ -984,7 +987,6 @@
- newargs = [a for a in newargs if a is not '']
+ newargs = [a for a in newargs if a != '']
-- # -c means do not link in gcc, and for us, the parallel is to not go all the way to JS, but stop at bitcode
- has_dash_c = '-c' in newargs
- if has_dash_c:
- assert has_source_inputs or has_header_inputs, 'Must have source code or header inputs to use -c'
- target = target_basename + '.o'
-@@ -1666,7 +1667,7 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR P
+ has_dash_S = '-S' in newargs
+ if has_dash_c or has_dash_S:
+ assert has_source_inputs or has_header_inputs, 'Must have source code or header inputs to use -c or -S'
+@@ -1838,7 +1840,7 @@
# First, generate LLVM bitcode. For each input file, we get base.o with bitcode
for i, input_file in input_files:
file_ending = get_file_suffix(input_file)
diff --git a/sdks/builds/wasm.mk b/sdks/builds/wasm.mk
index 3e34e1cbaf08..ab7ef306a0b8 100644
--- a/sdks/builds/wasm.mk
+++ b/sdks/builds/wasm.mk
@@ -1,7 +1,7 @@
#emcc has lots of bash'isms
SHELL:=/bin/bash
-EMSCRIPTEN_VERSION=1.38.38
+EMSCRIPTEN_VERSION=1.38.43
EMSCRIPTEN_LOCAL_SDK_DIR=$(TOP)/sdks/builds/toolchains/emsdk
EMSCRIPTEN_SDK_DIR ?= $(EMSCRIPTEN_LOCAL_SDK_DIR)
diff --git a/tools/offsets-tool-py/offsets-tool.py b/tools/offsets-tool-py/offsets-tool.py
index caaf1b96f1e2..10929bfdcf25 100644
--- a/tools/offsets-tool-py/offsets-tool.py
+++ b/tools/offsets-tool-py/offsets-tool.py
@@ -80,7 +80,7 @@ def require_emscipten_path (args):
if "wasm" in args.abi:
require_emscipten_path (args)
- self.sys_includes = [args.emscripten_path + "/system/include/libc"]
+ self.sys_includes = [args.emscripten_path + "/system/include/libc", args.emscripten_path + "/system/lib/libc/musl/arch/emscripten"]
self.target = Target ("TARGET_WASM", None, [])
self.target_args += ["-target", args.abi]

View File

@@ -1,54 +0,0 @@
From 0ed3f281bf0dbcc138ad90f1f4f5e746baf2e088 Mon Sep 17 00:00:00 2001
From: Zoltan Varga <vargaz@gmail.com>
Date: Thu, 26 Sep 2019 18:21:50 -0400
Subject: [PATCH] [wasm] Bump emscripten to 1.38.46.
---
sdks/builds/emscripten-pr-8457.diff | 12 ++----------
sdks/builds/wasm.mk | 2 +-
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/sdks/builds/emscripten-pr-8457.diff b/sdks/builds/emscripten-pr-8457.diff
index 360af836be69..e6ae67952b80 100644
--- a/sdks/builds/emscripten-pr-8457.diff
+++ b/sdks/builds/emscripten-pr-8457.diff
@@ -15,24 +15,16 @@
if file_suffix in SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + ASSEMBLY_ENDINGS + HEADER_ENDINGS or shared.Building.is_ar(arg): # we already removed -o <target>, so all these should be inputs
newargs[i] = ''
- if file_suffix.endswith(SOURCE_ENDINGS):
-+ if file_suffix.endswith(SOURCE_ENDINGS) or (has_dash_c and file_suffix.endswith(BITCODE_ENDINGS)):
++ if file_suffix.endswith(SOURCE_ENDINGS) or (has_dash_c and file_suffix.endswith(OBJECT_FILE_ENDINGS)):
input_files.append((i, arg))
has_source_inputs = True
elif file_suffix.endswith(HEADER_ENDINGS):
-@@ -984,7 +987,6 @@
-
- newargs = [a for a in newargs if a != '']
-
-- has_dash_c = '-c' in newargs
- has_dash_S = '-S' in newargs
- if has_dash_c or has_dash_S:
- assert has_source_inputs or has_header_inputs, 'Must have source code or header inputs to use -c or -S'
@@ -1838,7 +1840,7 @@
# First, generate LLVM bitcode. For each input file, we get base.o with bitcode
for i, input_file in input_files:
file_ending = get_file_suffix(input_file)
- if file_ending.endswith(SOURCE_ENDINGS):
-+ if file_ending.endswith(SOURCE_ENDINGS) or (has_dash_c and file_ending.endswith(BITCODE_ENDINGS)):
++ if file_ending.endswith(SOURCE_ENDINGS) or (has_dash_c and file_ending.endswith(OBJECT_FILE_ENDINGS)):
compile_source_file(i, input_file)
else: # bitcode
if file_ending.endswith(BITCODE_ENDINGS):
diff --git a/sdks/builds/wasm.mk b/sdks/builds/wasm.mk
index e8c6692c45ac..757a35028395 100644
--- a/sdks/builds/wasm.mk
+++ b/sdks/builds/wasm.mk
@@ -1,7 +1,7 @@
#emcc has lots of bash'isms
SHELL:=/bin/bash
-EMSCRIPTEN_VERSION=1.38.43
+EMSCRIPTEN_VERSION=1.38.46
EMSCRIPTEN_LOCAL_SDK_DIR=$(TOP)/sdks/builds/toolchains/emsdk
EMSCRIPTEN_SDK_DIR ?= $(EMSCRIPTEN_LOCAL_SDK_DIR)

View File

@@ -5,13 +5,13 @@ Date: Sat Dec 14 23:16:19 2019 +0100
Workaround
diff --git a/mcs/build/platforms/win32.make b/mcs/build/platforms/win32.make
index 9d920a3bf9b..481227c66e3 100644
index dd969b51..bb15aba2 100644
--- a/mcs/build/platforms/win32.make
+++ b/mcs/build/platforms/win32.make
@@ -20,10 +20,11 @@ EXTERNAL_RUNTIME = mono
ILDISASM = $(topdir)/../mono/mono/dis/monodis
@@ -9,10 +9,11 @@ PLATFORM_TEST_HARNESS_EXCLUDES = NotOnWindows
EXTERNAL_RUNTIME = mono
PLATFORM_MAKE_CORLIB_CMP = yes
-PLATFORM_CHANGE_SEPARATOR_CMD=tr '/' '\\\\'
+#PLATFORM_CHANGE_SEPARATOR_CMD=tr '\\' '/'
+PLATFORM_CHANGE_SEPARATOR_CMD=cat
@@ -23,7 +23,7 @@ index 9d920a3bf9b..481227c66e3 100644
hidden_prefix =
hidden_suffix = .tmp
diff --git a/mcs/build/profiles/build.make b/mcs/build/profiles/build.make
index b1c9a410e1e..004f9f33280 100644
index b1c9a410..004f9f33 100644
--- a/mcs/build/profiles/build.make
+++ b/mcs/build/profiles/build.make
@@ -32,7 +32,7 @@ endif
@@ -36,10 +36,10 @@ index b1c9a410e1e..004f9f33280 100644
MCS = $(BOOTSTRAP_MCS)
diff --git a/mcs/build/rules.make b/mcs/build/rules.make
index a77f1d11cc6..7a0bbfc0924 100644
index e57a636e..16f6cdc7 100644
--- a/mcs/build/rules.make
+++ b/mcs/build/rules.make
@@ -63,7 +63,7 @@ INTERNAL_CSC = CSC_SDK_PATH_DISABLED= $(RUNTIME) $(RUNTIME_FLAGS) $(CSC_RUNTIME_
@@ -60,7 +60,7 @@ INTERNAL_CSC = CSC_SDK_PATH_DISABLED= $(RUNTIME) $(RUNTIME_FLAGS) $(CSC_RUNTIME_
RESGEN = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/resgen.exe
STRING_REPLACER = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/cil-stringreplacer.exe
ILASM = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/ilasm.exe