Quote uses of $PREFIX in the build script, to improve support for installing into a path that contains spaces
For build-mingw-w64.sh to succeed when installing to such a path, the mingw-w64 version has to be updated to the latest git master. build-mingw-w64-libraries.sh still fails in this case, as libtool fails to properly quote $LD in a test for whether the linker is GNU ld.
This commit is contained in:
1 parent
ee555b9013
commit
64d39428b6
7 files changed
+49
-49
No files matched your search
+10
-10
@@ -29,7 +29,7 @@ export PATH="$PREFIX/bin:$PATH"
|
||||
: ${CORES:=4}
|
||||
: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}
|
||||
|
||||
CLANG_VERSION=$(basename $(dirname $(dirname $(dirname $($PREFIX/bin/clang --print-libgcc-file-name -rtlib=compiler-rt)))))
|
||||
CLANG_VERSION=$(basename "$(dirname "$(dirname "$(dirname "$("$PREFIX/bin/clang" --print-libgcc-file-name -rtlib=compiler-rt)")")")")
|
||||
|
||||
if [ ! -d llvm-project/compiler-rt ] || [ -n "$SYNC" ]; then
|
||||
CHECKOUT_ONLY=1 ./build-llvm.sh
|
||||
@@ -38,8 +38,8 @@ fi
|
||||
# Add a symlink for i386 -> i686; we normally name the toolchain
|
||||
# i686-w64-mingw32, but due to the compiler-rt cmake peculiarities, we
|
||||
# need to refer to it as i386 at this stage.
|
||||
if [ ! -e $PREFIX/i386-w64-mingw32 ]; then
|
||||
ln -sfn i686-w64-mingw32 $PREFIX/i386-w64-mingw32 || true
|
||||
if [ ! -e "$PREFIX/i386-w64-mingw32" ]; then
|
||||
ln -sfn i686-w64-mingw32 "$PREFIX/i386-w64-mingw32" || true
|
||||
fi
|
||||
|
||||
cd llvm-project/compiler-rt
|
||||
@@ -80,12 +80,12 @@ for arch in $ARCHS; do
|
||||
cmake \
|
||||
${CMAKE_GENERATOR+-G} "$CMAKE_GENERATOR" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=$PREFIX/$arch-w64-mingw32 \
|
||||
-DCMAKE_INSTALL_PREFIX="$PREFIX/$arch-w64-mingw32" \
|
||||
-DCMAKE_C_COMPILER=$arch-w64-mingw32-clang \
|
||||
-DCMAKE_CXX_COMPILER=$arch-w64-mingw32-clang++ \
|
||||
-DCMAKE_SYSTEM_NAME=Windows \
|
||||
-DCMAKE_AR=$PREFIX/bin/llvm-ar \
|
||||
-DCMAKE_RANLIB=$PREFIX/bin/llvm-ranlib \
|
||||
-DCMAKE_AR="$PREFIX/bin/llvm-ar" \
|
||||
-DCMAKE_RANLIB="$PREFIX/bin/llvm-ranlib" \
|
||||
-DCMAKE_C_COMPILER_WORKS=1 \
|
||||
-DCMAKE_CXX_COMPILER_WORKS=1 \
|
||||
-DCMAKE_C_COMPILER_TARGET=$buildarchname-windows-gnu \
|
||||
@@ -93,14 +93,14 @@ for arch in $ARCHS; do
|
||||
-DCOMPILER_RT_USE_BUILTINS_LIBRARY=TRUE \
|
||||
$SRC_DIR
|
||||
make -j$CORES
|
||||
mkdir -p $PREFIX/lib/clang/$CLANG_VERSION/lib/windows
|
||||
mkdir -p $PREFIX/$arch-w64-mingw32/bin
|
||||
mkdir -p "$PREFIX/lib/clang/$CLANG_VERSION/lib/windows"
|
||||
mkdir -p "$PREFIX/$arch-w64-mingw32/bin"
|
||||
for i in lib/windows/libclang_rt.*-$buildarchname*.a; do
|
||||
cp $i $PREFIX/lib/clang/$CLANG_VERSION/lib/windows/$(basename $i | sed s/$buildarchname/$libarchname/)
|
||||
cp $i "$PREFIX/lib/clang/$CLANG_VERSION/lib/windows/$(basename $i | sed s/$buildarchname/$libarchname/)"
|
||||
done
|
||||
for i in lib/windows/libclang_rt.*-$buildarchname*.dll; do
|
||||
if [ -f $i ]; then
|
||||
cp $i $PREFIX/$arch-w64-mingw32/bin
|
||||
cp $i "$PREFIX/$arch-w64-mingw32/bin"
|
||||
fi
|
||||
done
|
||||
if [ -n "$SANITIZERS" ]; then
|
||||
|
||||
Reference in new issue
Block a user