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:
parent
1278a6ce77
commit
446c666672
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue