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-10-02 15:58:00 +03:00
1 parent 6939aee0c0
commit 4bff0298c5
7 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -124,7 +124,7 @@ fi
mkdir -p "$PREFIX/bin"
cp wrappers/*-wrapper.sh "$PREFIX/bin"
for arch in $ARCHS; do
cp wrappers/$arch-w64-mingw32.cfg $PREFIX/bin
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.
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("--config");
exec_argv[arg++] = concat(arch, _T("-w64-mingw32.cfg"));
exec_argv[arg++] = _T("-target");
exec_argv[arg++] = target;
exec_argv[arg++] = _T("--end-no-unused-arguments");
for (int i = 1; i < argc; i++)
+1 -1
View File
@@ -92,7 +92,7 @@ mingw32uwp)
;;
esac
FLAGS="$FLAGS --config $ARCH-w64-mingw32.cfg"
FLAGS="$FLAGS -target $TARGET"
FLAGS="$FLAGS --end-no-unused-arguments"
$CCACHE "$CLANG" $FLAGS "$@" $LINKER_FLAGS
File renamed without changes.
File renamed without changes.