Skip to content

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

Merged
merged 2 commits into from
Mar 16, 2024
Merged

Map package optimization flags to features #72342

merged 2 commits into from
Mar 16, 2024

Conversation

elsh
Copy link
Contributor

@elsh elsh commented Mar 15, 2024

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

@elsh elsh requested review from xymus, nkcsgexi, artemcm and tshortli March 15, 2024 00:37
@elsh elsh force-pushed the elsh/add-features branch 2 times, most recently from 2b6f70d to 8d86bb8 Compare March 15, 2024 00:52
@elsh
Copy link
Contributor Author

elsh commented Mar 15, 2024

@swift-ci smoke test

@elsh
Copy link
Contributor Author

elsh commented Mar 15, 2024

@elsh elsh force-pushed the elsh/add-features branch from 8d86bb8 to c202fca Compare March 15, 2024 01:19
@elsh
Copy link
Contributor Author

elsh commented Mar 15, 2024

@swift-ci smoke test

@elsh elsh force-pushed the elsh/add-features branch 2 times, most recently from 896b56e to fdd7534 Compare March 15, 2024 02:22
@elsh
Copy link
Contributor Author

elsh commented Mar 15, 2024

@swift-ci smoke test

1 similar comment
@elsh
Copy link
Contributor Author

elsh commented Mar 15, 2024

@swift-ci smoke test

Opts.SkipNonExportableDecls |=
Args.hasArg(OPT_experimental_skip_non_inlinable_function_bodies) &&
Args.hasArg(
OPT_experimental_skip_non_inlinable_function_bodies_is_lazy);
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@@ -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,
Copy link
Contributor

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.

Copy link
Contributor Author

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
@elsh elsh force-pushed the elsh/add-features branch from 46f7e80 to 951e2ab Compare March 15, 2024 21:19
@elsh
Copy link
Contributor Author

elsh commented Mar 15, 2024

@swift-ci smoke test


if (Args.hasArg(OPT_enable_library_evolution)) {
Opts.SkipNonExportableDecls |=
Args.hasArg(OPT_experimental_skip_non_exportable_decls);
Copy link
Contributor

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

@elsh
Copy link
Contributor Author

elsh commented Mar 15, 2024

@swift-ci smoke test

@elsh
Copy link
Contributor Author

elsh commented Mar 16, 2024

@swift-ci smoke test linux

@elsh elsh enabled auto-merge March 16, 2024 01:44
@elsh elsh merged commit 8a4137a into main Mar 16, 2024
@elsh elsh deleted the elsh/add-features branch March 16, 2024 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants