Revert use of Clang config files
This reverts commit49db4a3a15,9f1f0104f1,4f95c14adf,c34dc64028,570fdcd251,4bff0298c5and6939aee0c0. When relying on Clang config files, two issues appeared: - Running the compiler-rt tests fails, because the compiler-rt tests disable any default config files, breaking the compiler in this case: https://github.com/llvm/llvm-project/blob/llvmorg-19.1.1/compiler-rt/test/lit.common.cfg.py#L983 - Wine fails to build using llvm-mingw as cross compiler, because Wine adds the --no-default-config flag to Clang while compiling, if supported: https://gitlab.winehq.org/wine/wine/-/blob/wine-9.19/configure.ac?ref_type=tags#L866-868 This causes llvm-mingw to omit the -rtlib=compiler-rt option (specified in a config file), making the compiler look for libgcc instead. Doing a check to see that linking succeeds doesn't necessarily help here - such a check already exists, but it tests linking with -nostdlib -nodefaultlibs: https://gitlab.winehq.org/wine/wine/-/blob/wine-9.19/aclocal.m4?ref_type=tags#L193-L206
This commit is contained in:
1 parent
49db4a3a15
commit
e0964ce24c
14 files changed
+119
-31
No files matched your search
+1
-7
@@ -123,10 +123,6 @@ fi
|
||||
|
||||
mkdir -p "$PREFIX/bin"
|
||||
cp wrappers/*-wrapper.sh "$PREFIX/bin"
|
||||
cp wrappers/mingw32-common.cfg $PREFIX/bin
|
||||
for arch in $ARCHS; do
|
||||
cp wrappers/$arch-w64-windows-gnu.cfg $PREFIX/bin
|
||||
done
|
||||
if [ -n "$HOST" ] && [ -n "$EXEEXT" ]; then
|
||||
# TODO: If building natively on msys, pick up the default HOST value from there.
|
||||
WRAPPER_FLAGS="$WRAPPER_FLAGS -DDEFAULT_TARGET=\"$HOST\""
|
||||
@@ -142,10 +138,8 @@ if [ -n "$EXEEXT" ]; then
|
||||
# when invoked from outside of MSYS.
|
||||
CTW_SUFFIX=$EXEEXT
|
||||
CTW_LINK_SUFFIX=$EXEEXT
|
||||
CSDW=clang-scan-deps-wrapper$EXEEXT
|
||||
else
|
||||
CTW_SUFFIX=.sh
|
||||
CSDW=clang-scan-deps
|
||||
fi
|
||||
cd "$PREFIX/bin"
|
||||
for arch in $ARCHS; do
|
||||
@@ -153,7 +147,7 @@ for arch in $ARCHS; do
|
||||
for exec in clang clang++ gcc g++ c++ as; do
|
||||
ln -sf clang-target-wrapper$CTW_SUFFIX $arch-w64-$target_os-$exec$CTW_LINK_SUFFIX
|
||||
done
|
||||
ln -sf $CSDW $arch-w64-$target_os-clang-scan-deps$CTW_LINK_SUFFIX
|
||||
ln -sf clang-scan-deps-wrapper$CTW_SUFFIX $arch-w64-$target_os-clang-scan-deps$CTW_LINK_SUFFIX
|
||||
for exec in addr2line ar ranlib nm objcopy readelf size strings strip llvm-ar llvm-ranlib; do
|
||||
if [ -n "$EXEEXT" ]; then
|
||||
link_target=llvm-wrapper
|
||||
|
||||
Reference in new issue
Block a user