You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add .snippet target to @main heuristics for including -parse-as-library (#5704)
The heuristics for deciding whether to include the `-parse-as-library` flag
were recently improved in #5687 (rdar://97297732). This change allows
`.snippet` target types to benefit from those improved heuristics.
According to the same rules, snippets with `@main` should get
`-parse-as-library`, while those assumed to have top-level code should not.
Testing: Changed the walk when searching for snippets to explicitly use the
`PackageBuilder.fileSystem`; the default argument uses the local filesystem,
which won't work for in-memory filesystems used in tests.
Testing: Added additional snippet files, one with `@main` and one without, to
`BuildPlanTests.testParseAsLibraryFlagForExe`.
rdar://97802934
0 commit comments