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ö
2018-04-21 15:57:27 +03:00
parent e2e9216853
commit 866d47cced
7 changed files with 4 additions and 4 deletions
+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.
+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