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-3433] Show short-form flags in -help output #46021

Closed
swift-ci opened this issue Dec 15, 2016 · 5 comments
Closed

[SR-3433] Show short-form flags in -help output #46021

swift-ci opened this issue Dec 15, 2016 · 5 comments

Comments

@swift-ci
Copy link
Collaborator

@swift-ci swift-ci commented Dec 15, 2016

Previous ID SR-3433
Radar None
Original Reporter dmishe (JIRA User)
Type Improvement
Status Closed
Resolution Won't Do
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, Driver
Assignee None
Priority Medium

md5: 7c9de4a873fd414a5cc88276f2e355cf

Issue Description:

For example, -whole-module-optimization has a shorter alias -wmo, that is not visible in swiftc -h output.

@belkadan
Copy link
Contributor

@belkadan belkadan commented Dec 15, 2016

-wmo specifically is deliberately not visible because we didn't want people using it casually. It's too jargony, and not something we want people to add to their builds without at least knowing what it stands for. It's mostly for us compiler people to test things by modifying existing command lines.

@swift-ci
Copy link
Collaborator Author

@swift-ci swift-ci commented Aug 15, 2017

Comment by Dmitry Shevchenko (JIRA)

Are there flags that have "public" short form variants? If not I think we can close this.

@belkadan
Copy link
Contributor

@belkadan belkadan commented Aug 15, 2017

There are a few. -c is actually an alias for -emit-object because Past Jordan wanted consistency for outputs. You can see that in the help output, ad hoc:

  -emit-assembly         Emit assembly file(s) (-S)
  -emit-bc               Emit LLVM BC file(s)
  -emit-executable       Emit a linked executable
  -emit-imported-modules Emit a list of the imported modules
  -emit-ir               Emit LLVM IR file(s)
  -emit-library          Emit a linked library
  -emit-object           Emit object file(s) (-c)
  -emit-sibgen           Emit serialized AST + raw SIL file(s)
  -emit-sib              Emit serialized AST + canonical SIL file(s)
  -emit-silgen           Emit raw SIL file(s)
  -emit-sil              Emit canonical SIL file(s)

@belkadan
Copy link
Contributor

@belkadan belkadan commented Aug 15, 2017

Looking at Options.td, I see

-### -driver-print-jobs
-h -help
-warn-swift3-objc-inference -warn-swift3-objc-inference-complete (mostly for compatibility while changing the name)
-c -emit-object
-S -emit-assembly

and a bunch of forms that allow equal signs instead of separate args. So maybe it's not worth it to do anything general.

@swift-ci
Copy link
Collaborator Author

@swift-ci swift-ci commented Aug 15, 2017

Comment by Dmitry Shevchenko (JIRA)

Yep, having them in the description of the long options is good enough IMO

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants