Commit Graph

827 Commits

Author SHA1 Message Date
Alexis Laferrière
09b06a8cd3 Revert "[Serialization] Enable deserialization safety by default"
This reverts commit af70cc5464.

# Conflicts:
#	test/Serialization/Safety/unsafe-decls.swift
2023-02-09 15:28:42 -08:00
Alexis Laferrière
af70cc5464 [Serialization] Enable deserialization safety by default
rdar://99495048
2023-01-19 10:50:55 -08:00
Alexis Laferrière
faeb226ac5 [Serialization] Update doc on EnableDeserializationRecovery
Integrate reviewer's comment in a previous PR.
2023-01-11 15:14:30 -08:00
Alexis Laferrière
d1343c86fb [Frontend] Intro flags to control deserialization safety
Deserialization safety remains off by default at the moment.
2023-01-06 12:02:47 -08:00
Erik Eckstein
21d39ba524 use the new llvm::Optional API
fixes warnings in rebranch
2022-12-19 14:04:43 +01:00
Artem Chikin
44a8f99d19 [DependencyScanning] Count target variant, clang target, and sdk versions as components of scanning context hash
Resolves rdar://103093122
2022-12-09 09:24:44 -08:00
Artem Chikin
990b95e9d8 [Dependency Scanning] Key into a global (shared) dependency scanning cache via context hash
Introduces a concept of a dependency scanning action context hash, which is used to select an instance of a global dependency scanning cache which gets re-used across dependency scanning actions.
2022-12-06 08:26:28 -08:00
Alexis Laferrière
9f34fa3601 Merge pull request #62148 from xymus/library-level-ipi-intro
[Sema] Accept and store the IPI library-level
2022-11-17 13:34:27 -08:00
Alexis Laferrière
a926b0555b [Sema] Accept and store the IPI library-level
Prepare to accept the `ipi` argument to the `-library-level` flag. IPI
stands for Internal Programming Interface and would describe a module
that's not to be distributed outside of its project.

In the future, the compiler could use that information to report when a
distributed module (api or spi) imports publicly a module that's not
distributed.

rdar://102435183
2022-11-16 16:29:56 -08:00
Robert Widmann
37e7052c68 Remove -emit-syntax and -verify-syntax-tree 2022-11-16 15:07:48 -08:00
Doug Gregor
f2f974bb94 [Macros] Add a flag -dump-macro-expansions as a debugging aid. 2022-11-14 21:31:29 -08:00
zoecarver
bf652b6f31 Put C foreign refernece types behind a flag. 2022-11-02 17:08:31 -07:00
Alexis Laferrière
90feb49d20 [Index] Remark on indexing system modules and use it in tests 2022-10-31 10:58:57 -07:00
Artem Chikin
bfa63750ce [ClangImporter] Add a mode to create the underlying Clang 'CompilerInvocation' directly from 'cc1' arguments, bypassing the Clang driver, only in the 'emit-pcm' compilation flow.
Controlled with a new flag '-direct-clang-cc1-module-build'

This will allow clients to formulate 'swift-frontend' invocations with fully-specified set of cc1 arguments (using '-Xcc -Xclang -Xcc <FLAG>') required for the PCM build, without having to go through the driver.
2022-09-27 09:59:06 -07:00
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
dcbef35982 [Sema] Intro flag to promote to an error missing explicit availability 2022-09-14 16:21:52 -07:00
Doug Gregor
9df77e9932 Add a stub constructor for LangOptions.
Having an out-of-line definition for the LangOptions constructor makes
it easier to enable experimental features one at a time for a build,
without rebuilding everything.
2022-09-07 18:14:07 -07:00
Alexis Laferrière
b680084748 [Sema] @_spiOnly needs to be enabled with a flag 2022-09-01 15:16:46 -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
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
swift-ci
da96ee6bd2 Merge remote-tracking branch 'origin/main' into rebranch 2022-07-20 12:38:23 -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
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
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
swift-ci
870cde61e8 Merge remote-tracking branch 'origin/main' into rebranch 2022-05-31 06:54:14 -07:00
Doug Gregor
6267513dab Add experimental feature for AdditiveArithmetic derived conformances 2022-05-30 21:28:32 -07:00
Doug Gregor
22ccb3fc3f Introduce experimental features for autodiff options 2022-05-30 21:26:17 -07:00
Doug Gregor
ad65a648df Delete superseded language option EnableConcisePoundFile 2022-05-30 21:11:43 -07:00
Doug Gregor
2598aa5405 Add experimental feature for bound generic extensions 2022-05-30 21:09:33 -07:00
swift-ci
d32d3311ab Merge remote-tracking branch 'origin/main' into rebranch 2022-05-30 11:14:36 -07:00
Doug Gregor
2cc91d04c9 Temporarily reinstate LangOptions::EnableBareSlashRegexLiterals for LLDB 2022-05-30 08:33:47 -07:00
Doug Gregor
3cf576da23 Refactor bare slash regex literals as a future feature 2022-05-30 08:33:46 -07:00
swift-ci
4ee528a886 Merge remote-tracking branch 'origin/main' into rebranch 2022-05-27 15:14:25 -07:00
Doug Gregor
8da6caeccd Add experimental feature for type witness system inference 2022-05-27 12:34:53 -07:00
Doug Gregor
333ae3f830 Add experimental feature for one-way closure parameters 2022-05-27 11:52:29 -07:00
Doug Gregor
b012270fca Adopt experimental-feature infrastructure for move-only feature 2022-05-26 14:21:26 -07:00
Doug Gregor
37dbf23ba2 Adopt experimental feature approach for flow-sensitive concurrency captures 2022-05-26 13:56:21 -07:00
Doug Gregor
0de5d7818d Make named opaque types an experimental feature 2022-05-26 13:44:08 -07:00
Doug Gregor
a523473315 Make static assertions an experimental feature 2022-05-26 13:43:36 -07:00
Doug Gregor
6d82448dc8 Add -enable-experimental-feature X for experimental features.
Experimental features can only be enabled in non-production (+Asserts)
builds. They can be detected with `hasFeature` in the same manner as
"future" features.

The `-enable-experimental-feature X` flag will also look for future
features by that name, so that when an experimental feature becomes an
accepted future feature, it will still be enabled in the same manner.

Switch variadic generics over to this approach, eliminating the
specific LangOption for it.
2022-05-26 11:50:39 -07:00
Ben Barham
92b6dd24c2 Merge branch 'main' into manually-merge-main 2022-05-25 15:55:35 -07:00
Robert Widmann
663722d892 Parameterized Existential Types Are Enabled By Default
See https://forums.swift.org/t/accepted-se-0353-constrained-existential-types/57560
2022-05-25 09:50:36 -07:00
swift-ci
f125662aca Merge remote-tracking branch 'origin/main' into rebranch 2022-05-10 12:53:39 -07:00
Slava Pestov
bfcaa39d37 Remove the GenericSignatureBuilder
Resolves rdar://problem/88136582.
2022-05-10 11:47:06 -04:00