Commit Graph

1817 Commits

Author SHA1 Message Date
Alexis Laferrière
1e40db1d4b Merge pull request #61105 from xymus/default-require-explicit-avail
[Sema] Require explicit availability on public modules and customizable diagnostics level
2022-09-15 11:05:12 -07:00
Alexis Laferrière
2175e4e27d [Sema] Enable require explicit availability by default for public modules
rdar://99929744
2022-09-14 16:21:52 -07:00
Alexis Laferrière
dcbef35982 [Sema] Intro flag to promote to an error missing explicit availability 2022-09-14 16:21:52 -07:00
Robert Widmann
18b79ffcfd Resolve a Layering Violation in libBasic
Basic should not be allowed to link Parse, yet it was doing so
to allow Version to provide a constructor that would conveniently
parse a StringRef. This entrypoint also emitted diagnostics, so it
pulled in libAST.

Sink the version parser entrypoint down into Parse where it belongs
and point all the clients to the right place.
2022-09-09 00:21:30 -07:00
Erik Eckstein
3e1ff0a5b7 IRGen: move the EnableStackProtector option from IRGenOptions to SILOptions.
... because we need it in the SIL pass pipeline, too.
Also, add Swift bridging for that option.
2022-09-08 08:42:24 +02:00
Evan Wilde
0d1c33674c Merge pull request #60711 from etcwilde/ewilde/reapply-backdeploy56
Revert reverting the 5.6 backdeploy
2022-09-06 14:58:17 -07:00
Alexis Laferrière
b680084748 [Sema] @_spiOnly needs to be enabled with a flag 2022-09-01 15:16:46 -07:00
Evan Wilde
f7810ada24 Revert "Merge pull request #60459 from etcwilde/ewilde/revert-backdeploy56"
This reverts commit 93387f8a0b, reversing
changes made to 88304c327f.
2022-09-01 10:07:44 -07:00
Artem Chikin
19831bea58 Merge pull request #60585 from artemcm/SeparateUpToDateCheck
[Explicit Modules] On an explicit interface build, early exit if expected output is up-to-date.
2022-08-23 10:24:18 -07:00
Pavel Yaskevich
bca9004ae1 Merge pull request #60707 from xedin/switch-to-string-format-for-locale
[Localization] Switch diagnostics/localization to `.strings` format
2022-08-23 09:49:27 -07:00
Pavel Yaskevich
5a164c5f8a [Frontend] Switch from YAML to .strings based localization 2022-08-22 10:23:06 -07:00
Alexis Laferrière
9e3f5f9cea [ModuleInterface] Print missing imports in swiftinterface
Hack to fix swiftinterfaces in case of missing imports. We can get rid
of this logic when we don't leak the use of non-locally imported things
in API.
2022-08-19 12:32:43 -07:00
Artem Chikin
256c0ff04a [Explicit Modules] On an explicit interface build, early exit if the expected output is up-to-date. 2022-08-16 18:31:13 -07:00
swift-ci
6f56287acf Merge remote-tracking branch 'origin/main' into rebranch 2022-08-09 11:16:06 -07:00
Evan Wilde
15b3659484 Revert "Merge pull request #60368 from etcwilde/ewilde/backdeploy56"
This reverts commit a3941bf215, reversing
changes made to b39302a585.
2022-08-09 07:16:02 -07:00
swift-ci
b5f90f7be8 Merge remote-tracking branch 'origin/main' into rebranch 2022-08-08 10:54:35 -07:00
Evan Wilde
a3941bf215 Merge pull request #60368 from etcwilde/ewilde/backdeploy56
Adding the Backdeploy 5.6 compatibility library
2022-08-08 10:41:39 -07:00
Ben Barham
22d62bb4e0 Merge remote-tracking branch 'origin/main' into rebranch
Trivial conflict caused by the line above the
`IGM.constructInitialFnAttributes` change in `lib/IRGen/GenDecl.cpp`
having an extra argument passed in rebranch (due to the new LLVM API).
2022-08-03 19:12:06 -07:00
Evan Wilde
2ac2249801 Stubbing out backdeploy library
This patch gets everything to the point of building the library, but it
doesn't run yet since I have missing symbols.

Unlike previous compatibility libraries and the concurrency
compatibility library, I'm organizing the headers a bit more. This is
because we're merging the two libraries into one. They share some common
header names, and while I could rename them for namespacing purposes,
it's easier to just use a directory structure for this.

The `include/Runtime` and corresponding `Runtime/` directories are for
backdeployed changes to the stdlib itself.

The `include/Concurrency` and corresponding `Concurrency/` directories
are for backdeployed changes to the concurrency runtimes.
2022-08-02 14:47:26 -07:00
Arnold Schwaighofer
0379719052 IRGen: Add option to enable stack protector
Adds frontend option -enable-stack-protector to enable emission of a
stack protector.

Disabled by default.

When enabled enables LLVM's strong stack protection mode.

rdar://93677524
2022-08-02 09:05:37 -07:00
swift-ci
69e5a83e7d Merge remote-tracking branch 'origin/main' into rebranch 2022-08-02 08:35:16 -07:00
Arnold Schwaighofer
78f5e0b0fd Merge pull request #60231 from aschwaighofer/generic_objc_method_list_section
IRGen: Add a list of class_ro_t referenced from generic class metadata patterns to a section __swift_rodatas
2022-08-02 08:23:52 -07:00
swift-ci
fe778db9fc Merge remote-tracking branch 'origin/main' into rebranch 2022-08-01 14:33:45 -07:00
Allan Shortlidge
34012dbc68 Frontend: Rename -enable-ad-hoc-availability to -weak-link-at-target.
I am separating the concern of weakly linking symbols that are introduced at the deployment target from the concern of type checking this new type of potential unavailability.

Resolves rdar://97925900
2022-08-01 11:57:06 -07:00
Arnold Schwaighofer
6ce452b928 IRGen: Add a list of class_ro_t referenced from generic class metadata patterns to a section __swift_rodatas
Put pointers to class_ro_t referenced from generic class patterns in a section __swift_rodatas such that they are discoverable by the linker.
The linker can then make the method lists contained in the class_ro_t relative like it can for objective c class metadata from non-generic swift classes.

rdar://66634459
2022-07-29 11:38:20 -07:00
Arnold Schwaighofer
9c3691f779 Merge pull request #60199 from aschwaighofer/enable_new_llvm_pass_manager
IRGen: Enable the new llvm pass manager
2022-07-27 17:01:07 -07:00
Arnold Schwaighofer
0475e7368d IRGen: Enable the new llvm pass manager
rdar://96687157
2022-07-26 08:10:10 -07:00
Erik Eckstein
47557553fd Merge remote-tracking branch 'origin/main' into rebranch 2022-07-26 09:08:08 +02:00
Allan Shortlidge
76bfd68e98 Frontend: Enable -target-min-inlining-version min for API modules by default.
Resolves rdar://67975153.
2022-07-25 15:21:12 -07:00
swift-ci
1611ec3dc3 Merge remote-tracking branch 'origin/main' into rebranch 2022-07-22 20:53:51 -07:00
Jonathan Penn
be5babf28c Add experimental flag to turn on just opaque type erasure (#60172)
This was already enabled as part of `-enable-implicit-dynamic` but this
new flag allows turning on opaque type erasure all by itself whether or
not `dynamic` is added explicitly.

rdar://97375478
2022-07-22 23:43:22 -04:00
Arnold Schwaighofer
d51a465ee1 IRGen: Enable the new llvm pass manager
rdar://96687157
2022-07-22 11:52:44 -07:00
swift-ci
b99996dbbd Merge remote-tracking branch 'origin/main' into rebranch 2022-07-21 13:37:34 -07:00
Artem Chikin
85b767dea2 Merge pull request #60139 from artemcm/AddConstValueExtractionPathHandling
Add supplementary output path handling for extracted compile-time-known values
2022-07-21 13:19:42 -07:00
swift-ci
da96ee6bd2 Merge remote-tracking branch 'origin/main' into rebranch 2022-07-20 12:38:23 -07:00
Doug Gregor
0fdba62bd8 Merge pull request #59055 from DougGregor/future-feature
[SE-0362] Piecemeal adoption of upcoming language improvements
2022-07-20 12:26:00 -07:00
Doug Gregor
a317fad88d Add -enable-upcoming-feature X command-line argument.
Introduce the `-enable-upcoming-feature X` command-line argument to
allow one to opt into features that will be enabled in an upcoming language
mode. Stage in several features this way (`ConciseMagicFile`,
`ForwardTrailingClosures`, `BareSlashRegexLiterals`).
2022-07-19 21:20:12 -07:00
Artem Chikin
b1fee939f1 Add supplementary output path handling for extracted compile-time-known values 2022-07-19 16:24:26 -07:00
swift-ci
c84de33192 Merge remote-tracking branch 'origin/main' into rebranch 2022-07-19 07:33:14 -07:00
Arnold Schwaighofer
599a37450b Add frontend flag -enable-new-llvm-pass-manager to enable new llvm pass manager 2022-07-15 13:11:37 -07:00
swift-ci
7382a9c41e Merge remote-tracking branch 'origin/main' into rebranch 2022-07-11 07:53:46 -07:00
Nate Chandler
b03904d704 [Freestanding] Use task-to-thread concurrency model.
Defined SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY to describe
whether the standard library will use the task-to-thread model for
concurrency.  It is true only for freestanding non-Darwin stdlibs.

When it is true, SWIFT_CONCURRENCY_TASK_TO_THREAD_MODEL is defined
during stdlib compilation of both Swift and C++ sources.

Added an option to LangOptions to specify which concurrency model is
used, either standard or task-to-thread.  When
SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY is true, the model is
specified to be task-to-thread.
2022-07-06 11:51:14 -07:00
swift-ci
35a2f137ce Merge remote-tracking branch 'origin/main' into rebranch 2022-07-05 17:54:14 -07:00
Holly Borla
dbc8307b64 Merge pull request #59829 from hborla/enable-bound-generic-extensions
[SE-0361] Enable bound generic extensions.
2022-07-05 17:38:59 -07:00
Holly Borla
01d46340e1 [SE-0361] Remove the feature flag for bound generic extensions. 2022-06-30 17:24:38 -07:00
swift-ci
cf93f5718f Merge remote-tracking branch 'origin/main' into rebranch 2022-06-30 08:54:09 -07:00
Holly Borla
0597b8db04 Merge pull request #59740 from hborla/remove-existential-opening-option
[LangOptions] Remove the option to enable/disable implicit existential opening.
2022-06-30 08:53:13 -07:00
swift-ci
2183c1d21a Merge remote-tracking branch 'origin/main' into rebranch 2022-06-29 15:13:35 -07:00
Allan Shortlidge
2515f7a58d Frontend: Introduce the -enable-experimental-ad-hoc-availability flag.
When developing a module for an OS or SDK, one may use declarations from other modules that were recently introduced in the in-development OS. Those declarations will be annotated as available at the deployment target of the client module and yet the symbols for that declaration are not available in all development builds of that OS. If the module strongly links those symbols, it will crash on older development builds of the OS. The `-enable-experimental-ad-hoc-availability` flag is designed to give developers the option of weakly linking all symbols in other modules that were introduced at the deployment target.

This change introduces the basic change in linking behavior but does not address typechecking. Use of the declarations that are made unavailable in this mode will need to be diagnosed and developers will need a way to detect the unavailability at runtime before use.

Resolves rdar://96011550
2022-06-29 11:44:07 -07:00
Holly Borla
6e8a581b42 [LangOptions] Remove the option to enable/disable implicit existential
opening.
2022-06-27 18:03:20 -07:00