Commit Graph

864 Commits

Author SHA1 Message Date
Artem Chikin
01d891ad99 Merge pull request #72834 from artemcm/UpstreamVisionOS
Introduce visionOS Platform
2024-04-15 09:33:49 -07:00
Rintaro Ishizaki
a16ad9c274 Merge pull request #71173 from rintaro/cmake-parservalidatoin
[CMake] Add option to perform SwiftParser validation by default
2024-04-12 15:03:31 -07:00
Yuta Saito
9582f5d960 Merge pull request #72998 from kateinoigakukun/yt/fix-wasm-build-on-machost
[wasm] Define CMake options for stdlib explicitly for Darwin host build
2024-04-12 15:15:03 +09:00
Yuta Saito
135f78ea08 [wasm] Define CMake options for stdlib explicitly for Darwin host build
The stdlib build for wasm target is failing on Darwin host due to
default values of some CMake options on Darwin host. We need to
explicitly define these options to make the build pass.
2024-04-12 03:06:02 +00:00
Yuta Saito
4508229a4e [wasm] Enable Cxx module build 2024-04-11 16:22:06 +00:00
Artem Chikin
1f14158a1d Introduce VisionOS Platform
This change introduces a new compilation target platform to the Swift compiler - visionOS.

- Changes to the compiler build infrastrucuture to support building compiler-adjacent artifacts and test suites for the new target.
- Addition of the new platform kind definition.
- Support for the new platform in language constructs such as compile-time availability annotations or runtime OS version queries.
- Utilities to read out Darwin platform SDK info containing platform mapping data.
- Utilities to support re-mapping availability annotations from iOS to visionOS (e.g. 'updateIntroducedPlatformForFallback', 'updateDeprecatedPlatformForFallback', 'updateObsoletedPlatformForFallback').
- Additional tests exercising platform-specific availability handling and availability re-mapping fallback code-path.
- Changes to existing test suite to accomodate the new platform.
2024-04-10 09:38:02 -07:00
Yuta Saito
067806c727 [wasm] Enable Synchronization module build 2024-04-10 14:47:42 +00:00
Yuta Saito
6ddf6833cb build: Use llvm-ranlib from the toolchain when building the wasm stdlib
llvm-ranlib is now installed in the toolchain, so we can use it instead of
the one in the build directory.

https://github.com/apple/swift/pull/72212
2024-03-30 12:36:40 +00:00
Yuta Saito
c8b1dc7ed0 test: Disable executable lit tests with WASI threads for now
We should enable them once WasmKit supports WASI threads.
2024-03-29 15:35:14 +00:00
Yuta Saito
ca5e7a6bdd build: Rename wasi-threads to wasip1-threads
The WASI community is transitioning to a new naming for the "preview"
version in the target triple: wasm32-wasi -> wasm32-wasip1.
At this moment, we keep the old triple wasm32-wasi because it's already
widely used, but we should start using the new triple threaded target.

LLVM checks only if the OS field *starts* with "wasi", so "wasip1" is
still considered a valid `isOSWASI()` target.

See: https://github.com/WebAssembly/wasi-libc/pull/478
2024-03-29 15:35:14 +00:00
Yuta Saito
ee0839aca4 build: Add -threads variant of Wasm stdlib build
This patch adds a `-threads` variant of the Wasm stdlib build, which
has completely different ABI and target triple. Now we build
non-threaded and threaded variants when `--build-wasm-stdlib` is
enabled.
2024-03-29 15:35:14 +00:00
Kuba Mracek
6798948c5b [embedded] Start building and including lld even in Darwin toolchains 2024-03-27 10:29:19 -07:00
Yuta Saito
52e8fbc115 Merge pull request #72345 from kateinoigakukun/katei/has-feature-swiftcall
[embedded] Use `__has_feature(swiftcc)` to detect Swift calling convention
2024-03-27 19:39:25 +09:00
Eric Miotto
0edd96e311 Merge pull request #72486 from edymtt/emiotto/add-flag-to-pass-arguments-to-dsymutil
build-script: add flag to pass arguments to dsymutil
2024-03-25 07:28:35 -07:00
Eric Miotto
efdd4954d3 build-script: add flag to pass arguments to dsymutil
This is currently needed to disable DWARF verification in
some Apple internal configurations.

Addresses rdar://125092216
2024-03-22 08:04:31 -07:00
Mike Ash
0491192337 [Runtime] Remove ExternalGenericMetadataBuilder. 2024-03-21 17:56:17 -04:00
Yuta Saito
f95fd21e1d [test] Add a test for class allocation on Embedded Wasm 2024-03-20 23:07:29 +00:00
Doug Gregor
922e3daaea Remove build infrastructure for globally enabling noncopyable types
Now that the compilation model of noncopyable types is enabled everywhere,
and one can enable the feature for specific modules, we no longer need a
separate build-script/CMake option to enable it globally. Remove it all.
2024-03-19 13:35:31 -07:00
Rokhini Prabhu
bae6450bf9 Merge pull request #72283 from apple/rokhinip/121121793-stdlib-minimal
Enable task-to-thread model by default for mixin_stdlib_minimal
2024-03-13 01:40:04 -07:00
Rokhini Prabhu
99069a3c4e Enable task-to-thread model by default for stdlib_freestanding_minimal
Radar-Id: rdar://problem/121121793
2024-03-12 19:38:19 -07:00
Yuta Saito
cf619e2a7e Merge pull request #71977 from kateinoigakukun/pr-5ff3fb0d5bd5d000aa636f748af814d1607455e3 2024-03-09 13:40:59 +09:00
Yuta Saito
82b1d9c803 build: Rename prefer_just_built_toolchain -> prefer_native_toolchain 2024-03-08 16:24:10 +00:00
Meghana Gupta
f3a85b118f Add build-script option and lit config for nonescapable_types
With this build-script has a flag --enable-experimental-nonescpable-types=1
to enable this feature in stdlib.

Also we can now add // REQUIRES: nonescapable_types to tests which run only when
the compiler is built with this feature turned on.
2024-03-06 21:57:03 -08:00
Yuta Saito
5a66841608 build: Respect native-*-tools-path when building Wasm stdlib
This change allows the Wasm stdlib to be built using the prebuilt Swift
toolchain instead of just built from source.
2024-02-29 17:47:37 +00:00
Ian Anderson
5acd961347 Merge pull request #71474 from ian-twilightcoder/builtin-float-overlay
[overlay] Make an overlay for the clang _Builtin_float module
2024-02-22 12:25:54 -08:00
Kuba Mracek
8e357df938 [embedded] Fix Python lint issues in llvm.py 2024-02-20 15:20:56 -08:00
Kuba Mracek
38bcffa6ff [embedded] When copying clang builtins from host toolchain, include macho_embedded libraries 2024-02-19 14:36:19 -08:00
Ian Anderson
1ce3935eb7 [overlay] Make an overlay for the clang _Builtin_float module
Clang's builtin float.h is no longer included in OS/SDK modules, and so it needs its own overlay.

rdar://122351557
2024-02-16 12:31:47 -08:00
Yuta Saito
8e0a79dc9e test: Skip some exhaustive tests for now due to WasmKit performance
Those tests check so many input variations and take too long (hours) to
run. We can re-enable them once WasmKit is well optimized.
2024-02-07 07:32:50 +00:00
Yuta Saito
581ee4ebcc build: Run executable tests with WasmKit when available
This patch allows running executable tests with WasmKit. If WasmKit is
not built, fall back to running only non-executable tests. Also add
stdlib and Concurrency executable tests to run.
2024-02-07 07:32:50 +00:00
Yuta Saito
2b1160475f build: Add WasmKit (a Wasm runtime) product
This patch adds a new product, WasmKit, which is a Wasm runtime that is
going to be used to run executable tests targeting Wasm. Note that the
product is not shipped as a part of the toolchain, but is used only for
testing purposes.
2024-02-07 07:32:45 +00:00
Mike Ash
4bc7726d43 Merge pull request #70900 from mikeash/swift-generic-metadata-builder-out-of-process
[Tools] Add a library to build specialized generic metadata out of process.
2024-01-26 10:50:34 -05:00
Rintaro Ishizaki
810a94cd0f [CMake] Add option to perform SwiftParser validation by default
Disabled by default. We'll enable it for some build presets.

rdar://121545713
2024-01-25 22:32:22 -08:00
Mike Ash
4341102c92 [Tools] Add a library to build specialized generic metadata out of process.
This library uses GenericMetadataBuilder with a ReaderWriter that can read data and resolve pointers from MachO files, and emit a JSON representation of a dylib containing the built metadata.

We use LLVM's binary file readers to parse the MachO files and resolve fixups so we can follow pointers. This code is somewhat MachO specific, but could be generalized to other formats that LLVM supports.

rdar://116592577
2024-01-24 20:45:50 -05:00
Kavon Farvardin
b92fe5f2e9 [build-script] fix NoncopyableGenerics option
This patch introduces `--enable-experimental-noncopyable-generics` for
the build script. It replaces
`--swift-stdlib-experimental-noncopyable-generics`

The old build option only enables the feature when building the
stdlib, but if we've built the stdlib with NoncopyableGenerics, the
compiler should be hardwired to have that feature enabled, too.

This patch also introduces the `noncopyable_generics` lit parameter, so
that tests assuming the system was built with the feature can live
in-tree and be tested, if they specify `REQUIRES: noncopyable_generics`.
2024-01-23 22:41:59 -08:00
Alex Hoppen
376e21617c Merge pull request #71042 from ahoppen/ahoppen/cross-compile-swiftformat
[build] Support cross-compilation of swift-format
2024-01-22 19:27:44 -08:00
Alex Hoppen
acad2bf251 [build] Support cross-compilation of swift-format
This should build swift-format as a fat binary containing both an x86_64 and an arm64 slice in the open source toolchains.

rdar://121326143
2024-01-21 13:45:53 -08:00
Allan Shortlidge
07a67437be Merge pull request #64656 from artemcm/LegacyDeathBed
Deprecate Legacy driver by removing incremental builds and adding warnings
2024-01-18 08:55:59 -08:00
Yuta Saito
a2256436cf Merge pull request #70511 from kateinoigakukun/katei/fix-global-executor-selection-wasm
build: Explicitly set `SWIFT_ENABLE_DISPATCH` to build Wasm stdlib
2024-01-18 14:20:23 +09:00
Artem Chikin
73b01dccfc Remove incremental builds from the Legacy driver
The C++-based driver is deprecated and this will help reduce the code surface that requires maintenance as the legacy driver is fully sunset.
2024-01-16 16:34:51 -08:00
Alejandro Alonso
e37ecac163 Merge pull request #68857 from Azoy/atomics
[stdlib] Atomics
2024-01-10 12:03:08 -08:00
Alex Hoppen
48d2797387 [swift-syntax] Verify that swift-syntax documentation builds without warnings
Companion to https://github.com/apple/swift-syntax/pull/2096
2024-01-08 16:56:11 -08:00
Alejandro Alonso
b68e864b5f Try to appease CI
more test fixes
2024-01-03 13:01:24 -05:00
Alejandro Alonso
2c0b473b8d Add Synchronization module 2023-12-18 14:01:16 -05:00
Alejandro Alonso
6d6e55a931 Apply feedback from pitch 2023-12-18 14:01:15 -05:00
Alejandro Alonso
ae983d8f84 Add Synchronization module 2023-12-18 14:01:14 -05:00
Yuta Saito
7a804188e1 build: Explicitly set SWIFT_ENABLE_DISPATCH to build Wasm stdlib
Stdlib build depends on `SWIFT_ENABLE_DISPATCH` to select concurrency
global executor implementation since ed8ed32dba
2023-12-16 14:49:39 +00:00
Alex Hoppen
5b98af866f [swift-syntax] Run swift run with --vv
This should help us figure out what’s going wrong in rdar://118460218.
2023-11-15 11:07:22 -08:00
Ben Barham
9ea3146904 Merge pull request #69564 from finagolfin/early-driver
[Build] Enable building the early Swift Driver on linux with the prebuilt host toolchain
2023-11-09 14:36:27 -08:00
Mike Ash
967c5c6a75 Merge pull request #69542 from mikeash/retain-release-override-optional
[Runtime] Add option to remove override point for retain/release.
2023-11-08 19:51:29 -05:00