mirror of
https://github.com/mstorsjo/llvm-mingw
synced 2026-06-21 14:01:00 +00:00
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:
+1
-1
@@ -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.
|
||||
|
||||
@@ -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++)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user