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
This commit is contained in:
Pirama Arumuga Nainar
2020-03-06 15:07:19 -08:00
parent 8c3fec4c37
commit b8eefa8956

View File

@@ -235,11 +235,6 @@ func (stl *stl) flags(ctx ModuleContext, flags Flags) Flags {
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 {