Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-5721] clang: warning: argument unused during compilation: '-pie' #48291

Open
ankitspd opened this issue Aug 21, 2017 · 9 comments
Open

[SR-5721] clang: warning: argument unused during compilation: '-pie' #48291

ankitspd opened this issue Aug 21, 2017 · 9 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself Linux Platform: Linux

Comments

@ankitspd
Copy link
Member

Previous ID SR-5721
Radar None
Original Reporter @aciidb0mb3r
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Linux
Assignee @jckarter
Priority Medium

md5: 7f59f01f8a40111b7999a4c1bf284308

Issue Description:

This new warning showed up on linux when compiling SwiftPM, e.g.: https://ci.swift.org/job/swift-package-manager-Linux-smoke-test/34/console

Most likely caused by:

#11272

@ematejska
Copy link
Mannequin

ematejska mannequin commented Aug 22, 2017

@jckarter Look familiar? Is the -pie only used during linking and should something else be passed at other times?

@ematejska
Copy link
Mannequin

ematejska mannequin commented Aug 22, 2017

@belkadan You might be interested as well.

@jckarter
Copy link
Member

I'm not sure exactly, but it would make sense that it's only really necessary when linking executables. The warning ought to be harmless, at least.

@ankitspd
Copy link
Member Author

Can we revert the PR until proper fix is placed?

@jckarter
Copy link
Member

I would rather not, personally; PIE is a functional necessity for linking Swift executables correctly, whereas this is merely a warning.

@belkadan
Copy link
Contributor

When do we invoke Clang that isn't for linking? Or is that coming from the importer somehow?

@swift-ci
Copy link
Collaborator

Comment by Gregor Milos (Grzegorz Miłoś) (JIRA)

I've put in a PR: #11669

based on: #11510

@keith
Copy link
Collaborator

keith commented Nov 19, 2018

Somewhat related: do you think there's a case for not warning about `-pie` on macOS to make the command line flags compatible with both macOS and Linux when using -Werror? Or do you think users should should be required to conditionally pass this flag.

@jckarter
Copy link
Member

It'd be reasonable to ask the clang folks that. It seems harmless since code for macOS/iOS/etc. should generally always be built PIC to begin with, so it's not really "ignoring" the argument per se.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself Linux Platform: Linux
Projects
None yet
Development

No branches or pull requests

5 participants