wrappers: Use -lucrtapp instead of -lvcruntime140_app

Passing -lucrt* to the clang driver inhibits the implicit default
-lmsvcrt, so this ends up only using libucrtapp.a instead of libucrt.a.

This still requires that the default crt was ucrt, as the prebuilt
libc++.a needs to have been built for the right crt.
This commit is contained in:
Martin Storsjö committed 2020-06-16 11:32:17 +03:00
1 parent da9b3b472b
commit 68b9eb60fa
3 files changed
+7 -5

No files matched your search

+3 -2
View File
@@ -192,8 +192,9 @@ int _tmain(int argc, TCHAR* argv[]) {
exec_argv[arg++] = _T("-DUNICODE");
// add the minimum runtime to use for UWP targets
exec_argv[arg++] = _T("-Wl,-lwindowsapp");
// This requires that the default crt is ucrt.
exec_argv[arg++] = _T("-Wl,-lvcruntime140_app");
// This still requires that the toolchain (in particular, libc++.a) has
// been built targeting UCRT originally.
exec_argv[arg++] = _T("-Wl,-lucrtapp");
// force the user of Universal C Runtime
exec_argv[arg++] = _T("-D_UCRT");
}
+3 -2
View File
@@ -74,8 +74,9 @@ mingw32uwp)
FLAGS="$FLAGS -DUNICODE"
# add the minimum runtime to use for UWP targets
FLAGS="$FLAGS -Wl,-lwindowsapp"
# This requires that the default crt is ucrt.
FLAGS="$FLAGS -Wl,-lvcruntime140_app"
# This still requires that the toolchain (in particular, libc++.a) has
# been built targeting UCRT originally.
FLAGS="$FLAGS -Wl,-lucrtapp"
# Force the Universal C Runtime
FLAGS="$FLAGS -D_UCRT"
;;
+1 -1
View File
@@ -34,7 +34,7 @@ esac
FLAGS="-m $M"
case $TARGET_OS in
mingw32uwp)
FLAGS="$FLAGS -lwindowsapp -lvcruntime140_app"
FLAGS="$FLAGS -lwindowsapp -lucrtapp"
;;
esac
ld.lld $FLAGS "$@"