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");
}