Add ctx.Windows()
Replace ctx.Os() == android.Windows with ctx.Windows() Test: builds Change-Id: I7c24c39bcf54a51ad152b21c0021e40a0c07f189
This commit is contained in:
@@ -204,7 +204,7 @@ func (binary *binaryDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags
|
||||
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 @@ func (binary *binaryDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags
|
||||
// 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")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user