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
+11
-1
@@ -69,6 +69,7 @@ TESTS_CPP_DLL="tlstest-lib"
|
||||
TESTS_SSP="stacksmash"
|
||||
TESTS_ASAN="stacksmash"
|
||||
TESTS_UBSAN="ubsan"
|
||||
TESTS_OMP="hello-omp"
|
||||
TESTS_UWP="uwp-error"
|
||||
TESTS_IDL="idltest"
|
||||
TESTS_OTHER_TARGETS="hello"
|
||||
@@ -196,12 +197,21 @@ for arch in $ARCHS; do
|
||||
$arch-w64-mingw32-clang $test.c -o $TEST_DIR/$test.exe -fsanitize=undefined
|
||||
TESTS_EXTRA="$TESTS_EXTRA $test"
|
||||
done
|
||||
for test in $TESTS_OMP; do
|
||||
case $arch in
|
||||
# OpenMP on windows only supports x86.
|
||||
i686|x86_64) ;;
|
||||
*) continue ;;
|
||||
esac
|
||||
$arch-w64-mingw32-clang $test.c -o $TEST_DIR/$test.exe -fopenmp=libomp
|
||||
TESTS_EXTRA="$TESTS_EXTRA $test"
|
||||
done
|
||||
DLL="$TESTS_C_DLL $TESTS_CPP_DLL"
|
||||
compiler_rt_arch=$arch
|
||||
if [ "$arch" = "i686" ]; then
|
||||
compiler_rt_arch=i386
|
||||
fi
|
||||
for i in libc++ libunwind libssp-0 libclang_rt.asan_dynamic-$compiler_rt_arch; do
|
||||
for i in libc++ libunwind libssp-0 libclang_rt.asan_dynamic-$compiler_rt_arch libomp; do
|
||||
if [ -f $PREFIX/$arch-w64-mingw32/bin/$i.dll ]; then
|
||||
cp $PREFIX/$arch-w64-mingw32/bin/$i.dll $TEST_DIR
|
||||
DLL="$DLL $i"
|
||||
|
||||
Reference in new issue
Block a user