Commit Graph

4565 Commits

Author SHA1 Message Date
Rintaro Ishizaki
82914d1979 Merge pull request #76986 from rintaro/newparservalidation-on-by-default
[build-script] Enable new parser validation by default
2024-10-14 12:55:46 -07:00
Rintaro Ishizaki
4616c77a33 [Parser] Enable new parser validation only in 'assertions' builds 2024-10-14 09:02:56 -07:00
swift-ci
da852e5db9 Merge remote-tracking branch 'origin/main' into rebranch 2024-10-14 07:16:03 -07:00
Richard Howell
3aed0950aa Merge pull request #76964 from rmaz/relres
Don't serialize relative resource dir paths in swiftmodules
2024-10-14 07:13:19 -07:00
swift-ci
8a2edbc4c5 Merge remote-tracking branch 'origin/main' into rebranch 2024-10-11 17:05:06 -07:00
Nate Chandler
49a2831d3f [CoroutineAccessors] Old ABI may be used via flag.
Add a setting to IRGenOptions and key off of it to emit yield_once_2
coroutines using either (1) the same code-path as yield_once coroutines
or (2) a new, not-yet implemented code-path.

Add flags to set the value in both directions.  During bringup, by
default, use the existing caller-allocated ABI.
2024-10-11 08:25:02 -07:00
Nate Chandler
9e45aa5975 [NFC] Frontend: IRGen arg parsing gets LangOpts.
Among other things, facilitates using features rather than bespoke
flags.
2024-10-10 18:08:27 -07:00
Richard Howell
7aa94723a6 Don't serialize relative resource dir module paths 2024-10-10 14:36:39 -07:00
swift-ci
ec2edb72f0 Merge remote-tracking branch 'origin/main' into rebranch 2024-10-09 14:44:21 -07:00
Steven Wu
1d402d2d62 [CachedDiagnostics] Optimize in case no diagnostics is emitted
When no diagnostics is emitted from the compilation, just use an empty
object as cached diagnostics. That is an optimization for storage to
avoid emitting some supporting file to recreate source manager when not
needed, also save a bit time from emitting YAML file.

rdar://128426132
2024-10-09 09:17:01 -07:00
swift-ci
9fd863f81e Merge remote-tracking branch 'origin/main' into rebranch 2024-10-08 10:50:24 -07:00
Steven Wu
5fa12d31ae Merge pull request #76738 from cachemeifyoucan/eng/PR-136787368
[CAS] Use IncludeTreeFileList instead of full CASFS for caching
2024-10-08 10:42:24 -07:00
Steven Wu
d7d385d083 Merge pull request #76787 from cachemeifyoucan/eng/PR-132250067
[CAS] Full support for make-style dependencies file caching hit
2024-10-08 10:41:55 -07:00
swift-ci
32d286280a Merge remote-tracking branch 'origin/main' into rebranch 2024-10-02 20:36:43 -07:00
nate-chandler
963e0d9528 Merge pull request #76803 from nate-chandler/bug/20241001/1
[Driver] Pass -emit-irgen thru to frontend.
2024-10-02 20:34:16 -07:00
swift-ci
546198141a Merge remote-tracking branch 'origin/main' into rebranch 2024-10-02 19:48:09 -07:00
Nate Chandler
9718aa5b29 [Driver] Pass -emit-irgen thru to frontend.
Add a new filetype for this mode option: "Raw LLVM IR". When the mode
option is emit-irgen, the new filetype will be the output kind;
conversely when determining the mode option to use, if the output kind
is the new filetype, the mode option will be emit-irgen.
2024-10-02 08:25:30 -07:00
Allan Shortlidge
9e93b7b730 Frontend: Remove support for -experimental-spi-imports flag.
Its functionality has been superseded by `@_spiOnly import`. There are no
longer any known clients and the flag was already unsupported in Swift 6, so
the functionality is now removed (but the flag is only deprecated for Swift 5).

Resolves rdar://136867210.
2024-10-01 17:27:22 -07:00
swift-ci
1f068d3d0b Merge remote-tracking branch 'origin/main' into rebranch 2024-09-30 22:33:31 -07:00
Allan Shortlidge
71ee93ddac Frontend: Refactor import collection for module interface printing.
Consolidates duplicated code. NFC.
2024-09-30 18:40:04 -07:00
Steven Wu
cd07d532af [CAS] Use IncludeTreeFileList instead of full CASFS for caching
Use IncludeTreeFileList instead of full feature CASFS for swift
dependency filesystem. This allows smaller CAS based VFS that is smaller
and faster. This is enabled by the CAS enabled compilation does not
need to iterate file system.

rdar://136787368
2024-09-30 16:01:33 -07:00
Steven Wu
b326c55d82 [CAS] Full support for make-style dependencies file caching hit
Fully support make-style `.d` dependencies file output by making
following improvements:
* All correct dependency file render when cache hit for a different
  output file location. The dependency file should list the correct
  output path, not the stale output path for the initial compilation
* When enable a path prefix mapper to canonicalize the path, the
  dependency file should render the input file correctly as the input
  file path on disk.

rdar://132250067
2024-09-30 15:53:18 -07:00
Ben Barham
c15bc19946 Merge remote-tracking branch 'origin/main' into main-to-rebranch
Conflicts:
  - `lib/Serialization/ModuleFileSharedCore.cpp` new headers on main
2024-09-26 16:01:56 -07:00
Doug Gregor
0aff85ced7 Emit mangled names for public symbols into the .swiftinterface
When the frontend option `-abi-comments-in-module-interface` is provided
during interface printing, the printed interface will contain
additional comments that provide the mangled names for public symbols.
This is an experiment in seeing how much information we can
meaningfully extract from a printed Swift interface for the purpose of
bridging with other languages.
2024-09-25 15:49:34 -07:00
swift-ci
753b917274 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-25 05:36:07 -07:00
Slava Pestov
bfc4f956fd Merge pull request #76662 from slavapestov/fine-grained-timers-flag
Add -fine-grained-timers flag
2024-09-25 08:26:08 -04:00
swift-ci
a0d7a9e5b8 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-24 19:19:27 -07:00
Rintaro Ishizaki
c57025af67 Avoid #include AST headers in Basic headers
Resolve a layering violation. `DiagnosticBehavior` was used in
`LangOptions`. Introduce a dedicated 'enum' for the possible values.
2024-09-24 15:18:26 -07:00
Slava Pestov
c77fae3a2d Basic: Add -fine-grained-timers flag
By default, -stats-output-dir does not collect per-request timers and
counters, because of overhead.
2024-09-23 18:04:25 -04:00
swift-ci
ec742a3482 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-20 10:54:04 -07:00
Arnold Schwaighofer
b49e30c01b IRGen: Add an option to force emission of an async context pointer on the stack for leaf funclets
`-Xfrontend -enable-async-frame-pointer-all`

rdar://135746607
2024-09-19 12:28:57 -07:00
swift-ci
5039a2d86c Merge remote-tracking branch 'origin/main' into rebranch 2024-09-18 10:55:29 -07:00
Doug Gregor
49aa0e966f Ensure that SourceFiles always have a backing buffer in the SourceManager
The "buffer ID" in a SourceFile, which is used to find the source file's
contents in the SourceManager, has always been optional. However, the
effectively every SourceFile actually does have a buffer ID, and the
vast majority of accesses to this information dereference the optional
without checking.

Update the handful of call sites that provided `nullopt` as the buffer
ID to provide a proper buffer instead. These were mostly unit tests
and testing programs, with a few places that passed a never-empty
optional through to the SourceFile constructor.

Then, remove optionality from the representation and accessors. It is
now the case that every SourceFile has a buffer ID, simplying a bunch
of code.
2024-09-16 21:46:42 -07:00
Ben Barham
a7b50f357f Merge remote-tracking branch 'origin/main' into manual-main-merge
Conflicts:
  - `lib/Driver/ToolChains.cpp` conflicting with the `addAllArgs` rename
    for multiple options
2024-09-16 13:53:18 -07:00
Artem Chikin
09b5431878 Merge pull request #76465 from artemcm/InheritTargetSDKInfoOnExplicitSwiftDep
[Dependency Scanning] Inherit target SDK name and version for textual interface build recipes
2024-09-14 07:47:53 -07:00
artemcm
8dbbc807c8 [Dependency Scanning] Inherit target SDK name and version for textual interface build recipes
Otherwise they get built with an empty SDK name string and we do not get the benefit of the SDK name compatibility check in case they are loading modules from an incompatible SDK

Resolves rdar://135972810
2024-09-13 16:10:06 -07:00
Artem Chikin
6990b89ec2 Merge pull request #72854 from artemcm/DefaultParallelDepScan
[Dependency Scanning] Enable parallel dependency scanning by-default
2024-09-13 14:30:01 -07:00
Ellie Shin
db2a4df6e1 Merge pull request #76450 from swiftlang/elsh/re-revert-pkg-name-pr
Revert "Revert "Do not print package-name in non-package interface by…
2024-09-13 12:53:59 -07:00
Arnold Schwaighofer
8e9cd5db68 Merge pull request #76150 from aschwaighofer/async_entry_ret_metadata
IRGen: Add metadata for async funclets denoting frame entry and frame exists
2024-09-13 11:52:00 -07:00
elsh
60f1ea4f85 Revert "Revert "Do not print package-name in non-package interface by default.""
This reverts commit 4b8e76fbeb.
2024-09-13 08:20:50 -07:00
Allan Shortlidge
07357b9c1f Merge pull request #76431 from rjmansfield/remove-more-unused-diags
Remove additional unused diagnostics.
2024-09-12 20:16:50 -07:00
Kuba (Brecka) Mracek
436e06f7b8 Merge pull request #76394 from kubamracek/embedded-no-textual-imports
[embedded] Disable building from textual interface files in Embedded Swift
2024-09-12 17:17:33 -07:00
Kavon Farvardin
ba0aac3f39 Merge pull request #76093 from kavon/coldsplit-2
ColdBlockInfo: overhaul analysis pass
2024-09-12 16:06:07 -07:00
Kuba Mracek
f37ba167a6 [embedded] Disable building from textual interface files in Embedded Swift 2024-09-12 10:40:22 -07:00
Ryan Mansfield
a097f9f660 Remove additonal unused diagnostics.
Also fix typo in diagnostics verifier error message.
2024-09-12 12:04:54 -04:00
Steven Wu
4693a4765f Merge pull request #76378 from cachemeifyoucan/eng/PR-135611011
[Modules] Make SubInstance spawn correctly under DirectCC1Mode
2024-09-11 15:28:11 -07:00
Artem Chikin
1ce178bc11 Merge pull request #76372 from artemcm/PrebuiltModulesEnvVar
[Prebuilt Module Cache] Add an environment variable overload to specify location of the prebuilt module cache
2024-09-11 13:07:53 -07:00
Doug Gregor
b272a05ea9 Merge pull request #76363 from DmT021/wp/print-diagnostic-groups
[Diagnostics] Add -print-diagnostic-groups flag
2024-09-11 13:04:07 -07:00
Artem Chikin
12b7df87ee [Prebuilt Module Cache] Add an environment variable overload to specify location of the prebuilt module cache
Useful for allowing e.g. CI systems to share this parameter without needing to plumb through a new compiler flag everywhere

Resolves rdar://135033114
2024-09-11 09:36:45 -07:00
Dmitrii Galimzianov
a8b71ea97f Add -print-diagnostic-groups flag
This change adds the `-print-diagnostic-groups` flag as described by SE-0443.
2024-09-11 13:34:42 +02:00