Commit Graph

7037 Commits

Author SHA1 Message Date
Rintaro Ishizaki
9017ef51ce [CMake] Update for review comments 2023-08-25 21:58:38 +00:00
Rintaro Ishizaki
9c9010e5b7 [CMake] Support Macros in Linux
For compiling codes required for macro support, we now need swiftc
compiler in the build machine.

Unlike Darwin OSes, where swiftCore runtime is guaranteed to be present
in /usr/lib, Linux doesn't have ABI stability and the stdlib of the
build machine is not at the specific location. So the built compiler
cannot relies on the shared object in the toolchain.
2023-08-24 17:04:15 +00:00
Ben Barham
8fbdae12fc [Build] Skip early-* on non-darwin hosts
These builds do not work outside of darwin currently. Rather than adding
the skip to all the necessary build presets, just disable in the product
instead.
2023-08-23 11:43:35 -07:00
Evan Wilde
0f0e68fc4c Merge pull request #68029 from etcwilde/ewilde/delete-backdeploy-concurrency
Delete backdeploy concurrency library
2023-08-23 09:03:09 -07:00
Dario Rexin
fb438e019b Merge pull request #68074 from bnbarham/disable-early-swift
[Presets] Disable early* on more Linux presets
2023-08-22 17:34:56 -07:00
Ben Barham
42683bc4af [Presets] Disable early* on more Linux presets
We don't handle building early swift-syntax on Linux yet. Disable it on
more failing presets.
2023-08-22 17:29:08 -07:00
Mishal Shah
5ba4ce568b Merge pull request #68050 from compnerd/reset
utils: invoke `update-checkout` with `--reset-to-remote`
2023-08-21 16:46:07 -07:00
Saleem Abdulrasool
20b921a1b0 utils: invoke update-checkout with --reset-to-remote
This should hopefully prevent unstaged change errors in CI.
2023-08-21 13:48:24 -07:00
Evan Wilde
e54b18370d Delete backdeploy concurrency library
This library served its purpose and has overstayed its welcome.
The library shipped in Xcode can't change again from the state it was
in, so changes to the sources here will not affect that library, which
is confusing. The library does not currently build due to changes in the
runtime headers, so it does not give meaningful signal to anything
anymore. If you need to test things in a backdeploy concurrency
environment, use the copy from the toolchain in Xcode as that will give
you a far clearer picture of what the code will actually be running with
than the state of the sources here did.
2023-08-20 11:01:23 -07:00
Alex Hoppen
52f062d409 [Cleanup] Remove AttributeKinds.py
I forgot to remove this file in https://github.com/apple/swift/pull/67666
2023-08-17 16:49:29 -07:00
Pavel Yaskevich
b21e8426a0 [AST] NFC: Remove @runtimeMetadata related code 2023-08-15 12:16:40 -07:00
Kim de Vos
bd618f1d25 Merge pull request #66573 from kimdv/kimdv/migrate-swift-syntax-build-script-to-swift 2023-08-11 22:35:09 +02:00
Mishal Shah
0455f8d592 [main] Add support for release/5.9.0 scheme to update checkout 2023-08-09 21:33:47 -07:00
swift-ci
d614d29c36 Merge pull request #67666 from ahoppen/ahoppen/kill-syntax-support
[AST] Remove gyb_syntax_support
2023-08-08 10:38:30 -07:00
Saleem Abdulrasool
b325f2a64d Merge pull request #67654 from tristanlabelle/build-windows-toolchain-runtimemsi-path
Update path to runtime msi wixproj in the Windows build
2023-08-04 22:30:34 -07:00
Kim de Vos
e9b316eea0 Migrate swift-syntax build script to Swift 2023-08-04 22:14:25 +02:00
Mishal Shah
310105779b Add stable/20230725 to the rebranch alias 2023-08-04 08:29:23 -07:00
Tristan Labelle
2e09edf46f Fixed line endings? 2023-08-02 14:33:32 -04:00
Tristan Labelle
fc987cdf7c Refactor wix output paths 2023-08-02 14:29:12 -04:00
Alex Hoppen
ef8e4ac0f3 [AST] Remove gyb_syntax_support
We are no longer using these Python files to generate anything in SwiftSyntax. We can just remove them and instead commit the generated `.def` files.
2023-08-01 17:20:14 -07:00
Tristan Labelle
804ec3c122 Update path to runtime msi wixproj in the Windows build 2023-08-01 15:04:56 -04:00
Tristan Labelle
1c5198a480 Update paths to wixprojs to their new location in subdirectories 2023-07-26 13:46:21 -04:00
Joe Groff
705e317c3f Merge pull request #67425 from jckarter/raw-storage
[WIP] Raw storage and locks/atomics prototype
2023-07-26 08:49:02 -07:00
swift-ci
8c05d55556 Merge pull request #67496 from kavon/no-more-pipes
No more `pipes`
2023-07-25 18:48:03 -07:00
Kavon Farvardin
b5e0f95a18 eliminate pipes in favor of shlex
This solves deprecation warnings in build-script:

```
DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
```

This change assumes that the minimum version
of Python3 is 3.3, which has `shlex.quote`.

Since our build bots currently use 3.6 as their
Python version, we can't yet use `shlex.join`
to further simplify some of the code using
quote.
2023-07-25 15:24:54 -07:00
Evan Wilde
8d9c54919e Update rebranch llvm checkout version
Updating the llvm version for the rebranch configuration in
update-checkout.
2023-07-25 13:32:04 -07:00
Alastair Houghton
ca9cac4f5b Merge pull request #67386 from finagolfin/spm-revert
Revert "Revert "build: bootstrap SwiftPM with forked and not host clang""
2023-07-25 16:19:33 +01:00
Doug Gregor
1d88dca7e2 [Availability] Update SwiftStdlib 5.9 availability to macOS 14/iOS 17-era 2023-07-24 15:06:10 -07:00
Joe Groff
aee071bf4e Introduce an experimental @_rawLayout attribute.
This attribute can be attached to a noncopyable struct to specify that its
storage is raw, meaning the type definition is (with some limitations)
able to do as it pleases with the storage. This provides a basis for
implementing types for things like atomics, locks, and data structures
that use inline storage to store conditionally-initialized values.
The example in `test/Prototypes/UnfairLock.swift` demonstrates the use
of a raw layout type to wrap Darwin's `os_unfair_lock` APIs, allowing
a lock value to be stored inside of classes or other types without
needing a separate allocation, and using the borrow model to enforce
safe access to lock-guarded storage.
2023-07-24 14:28:19 -07:00
Alastair Houghton
93e209cda4 Merge pull request #67483 from al45tair/eng/PR-112662487
[Linux] Make sure we install libexec.
2023-07-24 21:10:26 +01:00
Evan Wilde
669285fd17 Merge pull request #65534 from stephank/fix/cmake-3.25
build: fix accidental cmake expansions
2023-07-24 09:44:14 -07:00
Eric Miotto
81edb298bb Ensure CMark is not tested by default (#67459)
`test_cmark` is set by default to `True` because of the indirect  way
we define it through `--skip-test-cmark` -- we want instead the user to
opt in into this explicitly, as CMark tests on their own have little
value when building as part of Swift.

Addresses rdar://112604393
2023-07-24 07:28:58 -07:00
Alastair Houghton
a3eb585a88 [Linux] Make sure we install libexec.
We weren't installing the libexec component for Linux.

rdar://112662487
2023-07-24 12:46:18 +01:00
Max Desiatov
67e5f1ef38 Merge pull request #67473 from apple/maxd/wasm-run-tests
tests: configure Wasm runtime selection in `lit.cfg`

Currently `wasmer` is hardcoded as a Wasm runtime for running tests. We should make this configurable to be able to select an arbitrary runtime.
2023-07-22 21:02:52 +01:00
Max Desiatov
9e75e8e6a1 tests: configure Wasm runtime selection in lit.cfg 2023-07-22 15:30:16 +01:00
Max Desiatov
bfa726017a build: handle WASI in host_specific_configuration.py 2023-07-22 13:49:10 +01:00
Max Desiatov
e82060fbdb build: Add support for wasi-sysroot option in build-script
`wasi-sysroot` allows providing a path to a custom libc that supports this platform.
2023-07-22 13:44:05 +01:00
Erik Eckstein
2384a0c6f4 Optimizer: remove the now unused LSLocation utilities 2023-07-21 07:19:56 +02:00
Butta
ae6ff02d1b Revert "Revert "build: bootstrap SwiftPM with forked and not host clang""
This reverts a3dd8d677, which should be fixed by apple/swift-package-manager#6721.
2023-07-19 07:59:53 +05:30
Max Desiatov
0a1ae45ea6 Merge pull request #61376 from apple/maxd/build-alpine-product
Currently, when building LLVM/clang on Alpine Linux, CMake toolchain file specifies incorrect `<cpu_arch>-unknown-linux-musl` target, which makes the build immediately fail. Correct target that allows building on Alpine should be specified as `<cpu_arch>-alpine-linux-musl`, with `<cpu_arch>` replaced with respective CPU platform, e.g. `aarch64`.
2023-07-18 14:05:37 +02:00
Stéphan Kochen
7b460ce495 build: fix accidental cmake expansions
As of CMake 3.25, there are now global variables `LINUX=1`, `ANDROID=1`,
etc. These conflict with expressions that used these names as unquoted
strings in positions where CMake accepts 'variable|string', for example:

- `if(sdk STREQUAL LINUX)` would fail, because `LINUX` is now defined and
  expands to 1, where it would previously coerce to a string.

- `if(${sdk} STREQUAL "LINUX")` would fail if `sdk=LINUX`, because the
  left-hand side expands twice.

In this patch, I looked for a number of patterns to fix up, sometimes a
little defensively:

- Quoted right-hand side of `STREQUAL` where I was confident it was
  intended to be a string literal.

- Removed manual variable expansion on left-hand side of `STREQUAL`,
  `MATCHES` and `IN_LIST` where I was confident it was unintended.

Fixes #65028.
2023-07-17 21:50:50 +02:00
Alastair Houghton
a3dd8d6777 Revert "build: bootstrap SwiftPM with forked and not host clang" 2023-07-17 20:01:06 +01:00
Kuba Mracek
08fee9d5e6 Add arm64_32 as a valid freestanding arch 2023-07-13 09:07:18 -07:00
Max Desiatov
c1d2d8580c Use clang -print-target-triple instead of clang --version 2023-07-13 15:19:42 +01:00
Ben Barham
6e93ac1627 Merge pull request #66958 from DavidGoldman/main
Add source.request.index_to_store to sourcekitd
2023-07-12 13:53:33 -07:00
Alastair Houghton
4d4b1fc151 Merge pull request #64629 from finagolfin/spm-cc
build: bootstrap SwiftPM with forked and not host clang
2023-07-12 08:59:30 +01:00
Pavel Yaskevich
9719cd01ef [AST] InitAccessors: Introduce new @storageRestrictions(initializes:accesses:) attribute
This is the replacement for `initializes`, `accesses` attributes.
2023-07-07 10:00:35 -07:00
Mishal Shah
b03d8df2de Merge pull request #67018 from edymtt/edymtt/use-cmake-3.24.2-in-ci-for-linux
Build CMake 3.24.2 in Linux CI bots for main, next and rebranch
2023-07-07 10:41:00 -05:00
Alejandro Alonso
c80eb566ea Fix stdlib standalone build 2023-07-05 16:00:31 -07:00
Max Desiatov
501a5daab0 build: enable handling of alpine-linux-musl triple
Currently, when building LLVM/clang on Alpine Linux, CMake toolchain file specifies incorrect `<cpu_arch>-unknown-linux-musl` target, which makes the build immediately fail. Correct target that allows building on Alpine should be specified as `<cpu_arch>-alpine-linux-musl`, with `<cpu_arch>` replaced with respective CPU platform, e.g. `aarch64`.
2023-07-05 22:13:51 +01:00