Do not explicitly link ucrt, ucrtbase
This was required before MinGW's default crt was set to ucrt. In the
new setting, libmsvcrt.a is similar to libucrt.a and is implicitly
linked-in by the Clang driver. Not explicitly linking in ucrt avoids
the link-order issue discussed in
https://github.com/android/ndk/issues/1198.
Test: m native-host-cross, go/android-llvm-windows-testing.
Change-Id: Idc125e550cae2f0eb812ca310d1d4be898a29ab4
diff --git a/cc/stl.go b/cc/stl.go
index eda8a4f..8113f72 100644
--- a/cc/stl.go
+++ b/cc/stl.go
@@ -235,11 +235,6 @@
flags.Local.CppFlags = append(flags.Local.CppFlags, "-nostdinc++")
flags.extraLibFlags = append(flags.extraLibFlags, "-nostdlib++")
if ctx.Windows() {
- if stl.Properties.SelectedStl == "libc++_static" {
- // These are transitively needed by libc++_static.
- flags.extraLibFlags = append(flags.extraLibFlags,
- "-lmsvcrt", "-lucrt")
- }
// Use SjLj exceptions for 32-bit. libgcc_eh implements SjLj
// exception model for 32-bit.
if ctx.Arch().ArchType == android.X86 {