Build the OpenMP runtime in docker based builds
LLVM's OpenMP implementation only supports Windows on x86, and it requires a MASM-compatible assembler to build it. Build UASM for this purpose, for now. (UASM isn't available packaged in debian/ubuntu repos.) In the future, llvm-ml should be able to handle it instead, but it's not currently mature enough. Not including it in the regular build-all.sh for now, as UASM isn't generally available.
This commit is contained in:
1 parent
d5d30fae23
commit
9031eb6791
6 files changed
+222
-2
No files matched your search
@@ -127,6 +127,34 @@ 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
|
||||
|
||||
# OpenMP on windows only supports x86.
|
||||
RUN cd test && \
|
||||
for arch in $TOOLCHAIN_ARCHS; do \
|
||||
case $arch in \
|
||||
i686|x86_64) \
|
||||
;; \
|
||||
*) \
|
||||
continue \
|
||||
;; \
|
||||
esac && \
|
||||
for test in hello-omp; do \
|
||||
$arch-w64-mingw32-clang $test.c -o $arch/$test.exe -fopenmp=libomp || exit 1; \
|
||||
done; \
|
||||
done
|
||||
|
||||
RUN cd test && \
|
||||
for arch in $TOOLCHAIN_ARCHS; do \
|
||||
cp $TOOLCHAIN_PREFIX/$arch-w64-mingw32/bin/*.dll $arch || exit 1; \
|
||||
|
||||
Reference in new issue
Block a user