-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Map package optimization flags to features #72342
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
Conversation
2b6f70d
to
8d86bb8
Compare
@swift-ci smoke test |
@swift-ci smoke test |
896b56e
to
fdd7534
Compare
@swift-ci smoke test |
1 similar comment
@swift-ci smoke test |
lib/Frontend/CompilerInvocation.cpp
Outdated
Opts.SkipNonExportableDecls |= | ||
Args.hasArg(OPT_experimental_skip_non_inlinable_function_bodies) && | ||
Args.hasArg( | ||
OPT_experimental_skip_non_inlinable_function_bodies_is_lazy); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: it looks like the move lost the indention for these few lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
lib/Frontend/CompilerInvocation.cpp
Outdated
@@ -2101,7 +2145,7 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args, | |||
const FrontendOptions &FEOpts, | |||
const TypeCheckerOptions &TCOpts, | |||
DiagnosticEngine &Diags, | |||
const llvm::Triple &Triple, | |||
LangOptions &LangOpts, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I understand correctly that moving the option from Frontend to Lang was to be able to use the Features flags? I think I've hit that restriction before myself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes unfortunately.
allow a more standard way to pass experimental features from build systems. Also moved other flags relevant to diagnostics from Frontend options to Lang options. Ref: rdar://124648653
@swift-ci smoke test |
lib/Frontend/CompilerInvocation.cpp
Outdated
|
||
if (Args.hasArg(OPT_enable_library_evolution)) { | ||
Opts.SkipNonExportableDecls |= | ||
Args.hasArg(OPT_experimental_skip_non_exportable_decls); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: PR needs clang-format
@swift-ci smoke test |
@swift-ci smoke test linux |
Create features mapped to package optimization flags to
allow a more standard way to pass experimental features
from build systems. Also moved other flags relevant to
diagnostics from Frontend options to Lang options.
Ref: rdar://124648653