Commit Graph

6723 Commits

Author SHA1 Message Date
Allan Shortlidge
d2524a6de8 AST: Implement parsing support for the accepted spelling of @backDeployed for SE-0376.
For source compatibility `@_backDeploy` continues to be accepted as a spelling.

rdar://102792909
2023-02-01 22:04:33 -08:00
Eric Miotto
e1b4137282 LLVM product: amend installation path of compiler-rt libraries... (#63311)
...copied from the host toolchain

Addresses #62626, rdar://104724130
2023-02-01 09:41:41 -08:00
Arnold Schwaighofer
06452fbb47 Merge pull request #63329 from aschwaighofer/initial_relative_protocol_witness_tables_runtime
Initial runtime changes to support relative protocol witness tables
2023-02-01 06:00:05 -08:00
Anthony Latsis
4409c2fc6c Merge pull request #63271 from AnthonyLatsis/min-size-xcode
build: Override default build variant for `--xcode`
2023-02-01 04:18:19 +03:00
Arnold Schwaighofer
770648f161 Initial runtime changes to support relative protocol witness tables 2023-01-31 10:59:37 -08:00
Anthony Latsis
3f4f4ffafa build: Override default build variant for --xcode 2023-01-28 01:29:53 +03:00
Adrian Prantl
8738c8171b Merge pull request #63218 from adrian-prantl/verbose-tests
Verbose tests
2023-01-27 09:51:55 -08:00
Guillaume Lessard
d25994b47d Merge pull request #63237 from glessard/python-linting
[gardening] change an ambiguous variable name
2023-01-26 17:09:36 -08:00
Adrian Prantl
0e96efc435 Use LLVM_LIT_ARGS for the pkg tests. 2023-01-26 09:48:26 -08:00
Adrian Prantl
4bf4e9dbba Add an LLDB incremental buildbot preset 2023-01-26 09:48:26 -08:00
Adrian Prantl
6dcdb49558 build-script-impl: Have LLDB honor -llvm-lit-args 2023-01-26 09:48:26 -08:00
Richard Wei
dbbf6aa4f1 Merge branch 'main' into freestanding-macro-attr-cleanup 2023-01-26 18:09:45 +08:00
Doug Gregor
af7ce9e945 [Macros] Remove the @declaration attribute.
We have @freestanding working appropriately now.
2023-01-25 17:07:38 -08:00
Doug Gregor
c188ab4f91 Remove the "@expression" attribute now that it has a better spelling 2023-01-25 17:07:38 -08:00
Doug Gregor
d74f235eb9 Generalize @attached parsing and representation to also include @freestanding.
The attached and freestanding macro attributes use the same parsing
logic and representation, so generalize the "attached" attribute into
a more general "macro role" attribute.
2023-01-25 17:07:38 -08:00
Guillaume Lessard
36d230ed28 [gardening] change an ambiguous variable name
- lowercase-l trips some python lint configurations
2023-01-25 11:06:44 -08:00
Pavel Yaskevich
477a54a145 [AST] RuntimeMetadata: Allow using enums as custom runtime metadata types 2023-01-24 14:16:36 -08:00
Ellie Shin
37af51dc4c Merge branch 'main' into es-pkg-acl 2023-01-19 16:18:17 -08:00
Ellie Shin
1c66d02f92 Add package access level to enum AccessLevel
Resolves rdar://104198440
2023-01-19 15:54:18 -08:00
Alejandro Alonso
c7a9360806 [Reflection] Build the _Runtime and Reflection modules (#62973)
* Move Runtime into _Runtime

Fix more _Runtime names

* Add availability to all API

* Build _Runtime and Reflection modules

* Use threading's mutex for all platforms

add stdlib include
2023-01-17 09:30:16 -08:00
Saleem Abdulrasool
9e4f9f7541 Merge pull request #63053 from compnerd/over-indexed
Update build-windows-toolchain.bat
2023-01-17 09:14:35 -08:00
Eric Miotto
881e16c668 Build-script: ensure we can target armv7k with watchOS 9 SDK (#63020)
Updating to match `SDKSettings.plist`

Addresses rdar://100563701
2023-01-16 14:11:45 -08:00
Saleem Abdulrasool
ad959a9eb7 Update build-windows-toolchain.bat
Update `build-windows-toolchain.bat` to build IndexStoreDB statically.
This is used in exactly one location: SourceKit-LSP.  By statically
linking the product we reduce the distribution set and reduce the disk
size by ~50K.

Dynamic:
    629,248 IndexStoreDB.dll
  8,943,616 sourcekit-lsp.exe
Static:
  9,523,200 sourcekit-lsp.exe
2023-01-16 08:27:54 -08:00
Karoy Lorentey
0a041c084d [stdlib] Define and bump to version 5.9 2023-01-15 19:56:18 -08:00
Doug Gregor
92ce76667b Merge pull request #63035 from DougGregor/attached-attr 2023-01-14 15:23:07 -08:00
Kuba (Brecka) Mracek
e963e0cfdb build-script: Check the existence of Clang+Swift compilers when using a custom toolchain (#62975) 2023-01-14 11:07:55 -08:00
Doug Gregor
de16b47875 [Macros] Introduce the @attached attribute for declaring attached macros.
Describe attached macros with the `@attached` attribute, providing the
macro role and affected names as arguments to the macro. The form of
this macro will remain the same as it gains other kinds of attached
macro roles beyond "accessor".

Remove the "accessors" role from `@declaration`, which will be going
away.
2023-01-13 22:47:59 -08:00
Mishal Shah
9757ccfc45 Bump the Swift version to 5.9 (#63014) 2023-01-13 16:03:25 -08:00
Hamish Knight
50320d2a81 [cmake] Propagate lit_jobs to LLVM_LIT_ARGS
Missed this when I originally added the
`--lit-jobs` build-script option, propagate the value
provided to `LLVM_LIT_ARGS` in addition to
`SWIFT_LIT_ARGS`.
2023-01-12 16:02:05 +00:00
swift-ci
a82e17bffa Merge pull request #62934 from rxwei/freestanding-declaration-macros
[Macros] Freestanding declaration macros
2023-01-10 21:55:16 -08:00
Richard Wei
f17b7c48bf [Macros] Freestanding declaration macros
Add support for freestanding declaration macros.

- Parse `@declaration` attribute.
- Type check and expand `MacroExpansionDecl`.

Known issues:
- Generic macros are not yet handled.
- Expansion does not work when the parent decl context is `BraceStmt`. Need to parse freestanding declaration macro expansions in `BraceStmt` as `MacroExpansionDecl`, and add expanded decls to name lookup.
2023-01-10 19:09:11 -08:00
Dalton Claybrook
64e65c9acf Bump Swift Argument Parser checkout to 1.1.4 (#59009)
* Bump Swift Argument Parser checkout to 1.1.2

* Revert release/5.7 back to using swift-argument-parser 1.0.3

* Bump to 1.1.4

* Bump version
2023-01-10 00:39:55 -08:00
Yim Lee
0aaada24f8 Bump swift-crypto to 2.x (#62890) 2023-01-10 00:35:12 -08:00
Evan Wilde
312f52074c Disable catalyst builds again
While clang and the build-system can now handle generating
Catalysit-supporting executables, the OSS swift-frontend is missing
something.

This is failing in:
  SILGen/availability_query_maccatalyst_zippered_canonical_versions.swift

The compiler is only emitting the availability check-info for the macOS
target, not the iOS target.

e.g. for the following snippet

```
if #available(OSX 10.16, iOS 51.1.2, *) {
}
```

We end up emitting the literal checks for

integer_literal $Builtin.Word, 10
integer_literal $Builtin.Word, 16
integer_literal $Builtin.Word, 0

but we're missing

integer_literal $Builtin.Word, 51
integer_literal $Builtin.Word, 1
integer_literal $Builtin.Word, 2

This would be a most unfortunate miscompile.
2023-01-06 09:38:41 -08:00
Evan Wilde
e88e947272 Merge pull request #62712 from etcwilde/ewilde/zipping-zippers-zip
Add zippering support
2023-01-03 21:45:33 -08:00
Kuba (Brecka) Mracek
e9d1d3096a Stop using SWIFT_STDLIB_SINGLE_THREADED_CONCURRENCY under SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY (#62735)
Using single-threaded concurrency was a temporary solution, now that the task-to-thread model actually supports multiple threads, let's switch off of it. Instead, let's introduce a "global executor none" option (implicitly set under the task-to-thread model) to denote that the concurrency model is not using a global executor.

rdar://99448771
2023-01-03 15:24:57 -08:00
Saleem Abdulrasool
bff03d9061 Merge pull request #62786 from compnerd/static-yams
build: adopt static linking for Yams on Windows toolchain
2023-01-02 21:22:15 -08:00
Doug Gregor
0e691c45d2 Merge pull request #62747 from DougGregor/expression-macro-attr
[Macro] Add the expression attribute for macro declarations
2023-01-02 21:19:07 -08:00
Saleem Abdulrasool
20e573cfac build: adopt static linking for Yams on Windows toolchain
Windows now partially supports static linking of Swift libraries
(non-swiftCore targets).  Use this to enable static linking of Yams as
there is a single user (swift-driver).  This allows us to save ~256KB
due to the internalisation.
2022-12-28 07:34:07 -08:00
Robert Widmann
60952b868d Merge pull request #62659 from AnthonyLatsis/xcode-skip-swift-syntax 2022-12-22 11:37:19 -07:00
Doug Gregor
3e2bafc2f2 [Macro] Add the expression attribute for macro declarations 2022-12-22 09:10:01 -08:00
Evan Wilde
41d417107e Build with catalyst support in nightly osx package
Adding maccatalyst support to the osx nightly package.
2022-12-20 16:08:07 -08:00
Mishal Shah
4d5ce9852a Fix the branches for DocC and markdown 2022-12-19 16:27:00 -08:00
Mishal Shah
fe0715ddfb Add support for Swift 5.8 branch 2022-12-19 15:35:13 -08:00
Allan Shortlidge
c317feefb6 Utils: Decode subprocess output as UTF-8 in swift-api-dump.py.
The fix prevents errors like this:

```
Collecting frameworks from macOS b'13.0' at b'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk'
Traceback (most recent call last):
  File "./swift-api-dump.py", line 360, in <module>
    main()
  File "./swift-api-dump.py", line 346, in main
    jobs = jobs + create_dump_module_api_args(
  File "./swift-api-dump.py", line 265, in create_dump_module_api_args
    (frameworks, sdk_root) = collect_frameworks(sdk)
  File "./swift-api-dump.py", line 246, in collect_frameworks
    for entry in os.listdir(frameworks_dir):
FileNotFoundError: [Errno 2] No such file or directory: "b'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk'/System/Library/Frameworks"
```

Resolves rdar://100295474.
2022-12-19 13:37:03 -05:00
Saleem Abdulrasool
53e4d03156 Merge pull request #62510 from buttaface/ar
Install llvm-ar in the toolchain
2022-12-18 09:14:35 -08:00
Saleem Abdulrasool
04f4d66b73 Merge pull request #62388 from compnerd/naming
build: rename `EXPERIMENTAL_STRING_PROCESSING_SOURCE_DIR`
2022-12-18 08:50:40 -08:00
Anthony Latsis
1d3b70d66c build: Make --xcode imply --skip-early-swiftsyntax
One can use the package file in the swift-syntax repo for this
2022-12-17 20:00:59 +03:00
Alex Hoppen
cdf59ad7f7 Merge pull request #62607 from ahoppen/ahoppen/move-gyb-syntax-support
Copy files from SwiftSyntax’s gyb_syntax_support that are relevant to the compiler to this repo
2022-12-16 17:38:14 +01:00
Alex Hoppen
7c251b2c14 Merge pull request #62584 from ahoppen/ahoppen/lint-swiftsyntax
[build] Verify that SwiftSyntax is correctly formatted
2022-12-15 21:16:12 +01:00