wrappers: Pick up the Clang config file implicitly

Clang only picks up config files implicitly using the normalized
triple form, so use file names with "-windows-gnu" instead of
"-mingw32".

In theory, we could also want to pick up the config file implicitly
by having "<triple>-<mode>" be a symlink directly to the clang
executable. That works for regular mingw32 targets, but for the
mingw32uwp target, there's no distinction in the normalized
triple, so both would end up using the same "-windows-gnu" config
files. So as long as we want to support the mingw32uwp prefixed
tools, we need to use a wrapper.
This commit is contained in:
Martin Storsjö committed 2024-11-06 11:40:30 +02:00
1 parent e2e9216853
commit 866d47cced
7 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -124,7 +124,7 @@ fi
mkdir -p "$PREFIX/bin" mkdir -p "$PREFIX/bin"
cp wrappers/*-wrapper.sh "$PREFIX/bin" cp wrappers/*-wrapper.sh "$PREFIX/bin"
for arch in $ARCHS; do for arch in $ARCHS; do
cp wrappers/$arch-w64-mingw32.cfg $PREFIX/bin cp wrappers/$arch-w64-windows-gnu.cfg $PREFIX/bin
done done
if [ -n "$HOST" ] && [ -n "$EXEEXT" ]; then if [ -n "$HOST" ] && [ -n "$EXEEXT" ]; then
# TODO: If building natively on msys, pick up the default HOST value from there. # TODO: If building natively on msys, pick up the default HOST value from there.
File renamed without changes.
File renamed without changes.
+2 -2
View File
@@ -78,8 +78,8 @@ int _tmain(int argc, TCHAR* argv[]) {
exec_argv[arg++] = _T("-D_UCRT"); exec_argv[arg++] = _T("-D_UCRT");
} }
exec_argv[arg++] = _T("--config"); exec_argv[arg++] = _T("-target");
exec_argv[arg++] = concat(arch, _T("-w64-mingw32.cfg")); exec_argv[arg++] = target;
exec_argv[arg++] = _T("--end-no-unused-arguments"); exec_argv[arg++] = _T("--end-no-unused-arguments");
for (int i = 1; i < argc; i++) for (int i = 1; i < argc; i++)
+1 -1
View File
@@ -92,7 +92,7 @@ mingw32uwp)
;; ;;
esac esac
FLAGS="$FLAGS --config $ARCH-w64-mingw32.cfg" FLAGS="$FLAGS -target $TARGET"
FLAGS="$FLAGS --end-no-unused-arguments" FLAGS="$FLAGS --end-no-unused-arguments"
$CCACHE "$CLANG" $FLAGS "$@" $LINKER_FLAGS $CCACHE "$CLANG" $FLAGS "$@" $LINKER_FLAGS
File renamed without changes.
File renamed without changes.