Don't pass -pie for Windows binaries

Passing -pie to clang for Windows binaries causes a warning:
clang-7: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]

Bug: 115776263
Test: m checkbuild
Change-Id: Ie502a05dac32c192c38953c684dc80d1db24b792
This commit is contained in:
Colin Cross 2018-09-14 16:00:16 -07:00
parent 1278a6ce77
commit 446c666672
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ func (binary *binaryDecorator) staticBinary() bool {
func (binary *binaryDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags {
flags = binary.baseLinker.linkerFlags(ctx, flags)
if ctx.Host() && !binary.static() {
if ctx.Host() && !ctx.Windows() && !binary.static() {
if !ctx.Config().IsEnvTrue("DISABLE_HOST_PIE") {
flags.LdFlags = append(flags.LdFlags, "-pie")
}