Add ctx.Windows()
Replace ctx.Os() == android.Windows with ctx.Windows()
Test: builds
Change-Id: I7c24c39bcf54a51ad152b21c0021e40a0c07f189
diff --git a/cc/binary.go b/cc/binary.go
index 637f6c7..2578311 100644
--- a/cc/binary.go
+++ b/cc/binary.go
@@ -204,7 +204,7 @@
if ctx.Host() && !binary.static() {
if !ctx.AConfig().IsEnvTrue("DISABLE_HOST_PIE") {
flags.LdFlags = append(flags.LdFlags, "-pie")
- if ctx.Os() == android.Windows {
+ if ctx.Windows() {
flags.LdFlags = append(flags.LdFlags, "-Wl,-e_mainCRTStartup")
}
}
@@ -213,7 +213,7 @@
// MinGW spits out warnings about -fPIC even for -fpie?!) being ignored because
// all code is position independent, and then those warnings get promoted to
// errors.
- if ctx.Os() != android.Windows {
+ if !ctx.Windows() {
flags.CFlags = append(flags.CFlags, "-fpie")
}