build-openmp.sh: Use llvm-ml instead of uasm
This commit is contained in:
1 parent
63a5d3c09f
commit
ea46c8d98f
5 files changed
+3
-68
No files matched your search
-10
@@ -44,16 +44,6 @@ ARG TOOLCHAIN_ARCHS="i686 x86_64 armv7 aarch64"
|
||||
|
||||
ARG DEFAULT_CRT=ucrt
|
||||
|
||||
# Build UASM, for building openmp. In the future, llvm-ml should be able
|
||||
# to handle it, but it doesn't yet.
|
||||
RUN git clone https://github.com/Terraspace/UASM && \
|
||||
cd UASM && \
|
||||
git checkout 16a853bd6de807fe2c42569f8375a029684c0f22 && \
|
||||
make -f gccLinux64.mak -j$(nproc) && \
|
||||
mkdir -p $TOOLCHAIN_PREFIX/bin && \
|
||||
cp GccUnixR/uasm $TOOLCHAIN_PREFIX/bin
|
||||
COPY wrappers/uasm-wrapper.sh $TOOLCHAIN_PREFIX/bin
|
||||
|
||||
# Build everything that uses the llvm monorepo. We need to build the mingw runtime before the compiler-rt/libunwind/libcxxabi/libcxx runtimes.
|
||||
COPY build-llvm.sh strip-llvm.sh install-wrappers.sh build-mingw-w64.sh build-mingw-w64-tools.sh build-compiler-rt.sh build-mingw-w64-libraries.sh build-libcxx.sh build-openmp.sh ./
|
||||
COPY wrappers/*.sh wrappers/*.c wrappers/*.h ./wrappers/
|
||||
|
||||
@@ -158,15 +158,6 @@ RUN cd test && \
|
||||
done; \
|
||||
done
|
||||
|
||||
# Build UASM, for building openmp. In the future, llvm-ml should be able
|
||||
# to handle it, but it doesn't yet.
|
||||
RUN git clone https://github.com/Terraspace/UASM && \
|
||||
cd UASM && \
|
||||
git checkout 16a853bd6de807fe2c42569f8375a029684c0f22 && \
|
||||
make -f gccLinux64.mak -j$(nproc) && \
|
||||
mkdir -p $TOOLCHAIN_PREFIX/bin && \
|
||||
cp GccUnixR/uasm $TOOLCHAIN_PREFIX/bin
|
||||
COPY wrappers/uasm-wrapper.sh $TOOLCHAIN_PREFIX/bin
|
||||
# Build OpenMP
|
||||
COPY build-openmp.sh ./
|
||||
RUN ./build-openmp.sh $TOOLCHAIN_PREFIX
|
||||
|
||||
@@ -38,3 +38,4 @@ done
|
||||
./build-libcxx.sh $PREFIX
|
||||
./build-compiler-rt.sh $PREFIX --build-sanitizers
|
||||
./build-libssp.sh $PREFIX
|
||||
./build-openmp.sh $PREFIX
|
||||
+2
-20
@@ -54,31 +54,13 @@ else
|
||||
BUILDCMD=make
|
||||
fi
|
||||
|
||||
if [ ! -x "$(which uasm)" ]; then
|
||||
echo Building the OpenMP runtime requires UASM
|
||||
exit 1
|
||||
fi
|
||||
UASM=uasm
|
||||
case $(uname) in
|
||||
MINGW*|MSYS*)
|
||||
# On windows, only building with ninja works; building with msys make
|
||||
# ends up mangling the forward slashes in certain options to UASM.
|
||||
;;
|
||||
*)
|
||||
# UASM for unix doesn't support options with forward slashes, which CMake
|
||||
# produces in some places. And ninja on windows can't execute a
|
||||
# shell script, so this has to be done only on unix.
|
||||
UASM=uasm-wrapper.sh
|
||||
;;
|
||||
esac
|
||||
|
||||
for arch in $ARCHS; do
|
||||
CMAKEFLAGS=""
|
||||
case $arch in
|
||||
i686)
|
||||
;;
|
||||
x86_64)
|
||||
CMAKEFLAGS="$CMAKEFLAGS -DLIBOMP_ASMFLAGS=-win64"
|
||||
CMAKEFLAGS="$CMAKEFLAGS -DLIBOMP_ASMFLAGS=-m64"
|
||||
;;
|
||||
*)
|
||||
# Not supported
|
||||
@@ -97,7 +79,7 @@ for arch in $ARCHS; do
|
||||
-DCMAKE_C_COMPILER=$arch-w64-mingw32-clang \
|
||||
-DCMAKE_CXX_COMPILER=$arch-w64-mingw32-clang++ \
|
||||
-DCMAKE_RC_COMPILER=$arch-w64-mingw32-windres \
|
||||
-DCMAKE_ASM_MASM_COMPILER=$UASM \
|
||||
-DCMAKE_ASM_MASM_COMPILER=llvm-ml \
|
||||
-DCMAKE_CROSSCOMPILING=TRUE \
|
||||
-DCMAKE_SYSTEM_NAME=Windows \
|
||||
-DCMAKE_AR="$PREFIX/bin/llvm-ar" \
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2020 Martin Storsjo
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
ARGS=""
|
||||
while [ $# -gt 0 ]; do
|
||||
a="$1"
|
||||
case $a in
|
||||
/safeseh|/coff|/c|/Fo)
|
||||
a="-${a#/}"
|
||||
;;
|
||||
esac
|
||||
ARGS="$ARGS $a"
|
||||
shift
|
||||
done
|
||||
|
||||
uasm $ARGS
|
||||
Reference in new issue
Block a user