diff --git a/Dockerfile b/Dockerfile index 4c39a2c..28daee8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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/ diff --git a/Dockerfile.dev b/Dockerfile.dev index fe384f4..a34aa3f 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -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 diff --git a/build-all.sh b/build-all.sh index 7ae55e7..c1ce818 100755 --- a/build-all.sh +++ b/build-all.sh @@ -38,3 +38,4 @@ done ./build-libcxx.sh $PREFIX ./build-compiler-rt.sh $PREFIX --build-sanitizers ./build-libssp.sh $PREFIX +./build-openmp.sh $PREFIX diff --git a/build-openmp.sh b/build-openmp.sh index 3b6c394..f73515a 100755 --- a/build-openmp.sh +++ b/build-openmp.sh @@ -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" \ diff --git a/wrappers/uasm-wrapper.sh b/wrappers/uasm-wrapper.sh deleted file mode 100755 index d69e8b5..0000000 --- a/wrappers/uasm-wrapper.sh +++ /dev/null @@ -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