Commit Graph

217 Commits

Author SHA1 Message Date
Jeremy Schonfeld
f3acbb079f Remove ICU from the toolchain (#75262)
* Remove ICU from the toolchain

* Remove icu comment from GettingStarted.md
2024-07-17 18:19:16 -07:00
Carl Peto
ee57481d7c [AVR] AVR support - Initial PR
- Add simple support for the AVR architecture, as a supported conditional compilation value, and added to the default llvm targets to build.

(Later PRs will fix support for 16-bit pointers, which is broken in places, and any fixes needed to get the standard library to build.)

(Note: AVR as a target is expected to always be compiled with -enable-experimental-feature Embedded.)
2024-07-06 18:22:10 +01:00
Kuba (Brecka) Mracek
9e7501601c Merge pull request #74489 from kubamracek/embedded-less-stdlibs
[embedded] Don't build *all* the embedded stdlibs by default
2024-06-18 13:50:25 -07:00
Kuba Mracek
37ed08dc7b Add a build-script + CMake flag to enable/disable building the _Volatile module 2024-06-17 13:18:55 -07:00
Kuba Mracek
dc2edb6e9b [embedded] Don't build *all* the embedded stdlibs by default 2024-06-17 10:32:56 -07:00
Alastair Houghton
2056b26258 [Build] Move the .cfg file generation to a new product.
We need to move the `.cfg` file generation to a new product so that we can
land it in the default toolchain for Xcode.

rdar://128612098
2024-05-24 08:27:17 +01:00
Eric Miotto
ce0e620d1a [CMake] allow custom options when building the compiler with debug info
Currently those are hardcoded to `-g`, but in some Apple internal
configurations we would like to change them.

There are other part of the build system that hardcode `-g`
(e.g. in `SwiftCompilerSources` and `AddSwiftStdlib.cmake`),
but we are not interested in those at the moment -- we will address those
in the future if need be.

Supports rdar://127503136
2024-05-14 08:42:35 -07:00
Kuba Mracek
ab5425fc1f Update test expectations around --skip-build-lld 2024-05-09 15:46:48 -07:00
eeckstein
ade04a7945 Merge pull request #73417 from eeckstein/force-bootstrapping
Force enabling SwiftCompilerSources in the build
2024-05-07 07:55:23 +02:00
Erik Eckstein
410b81b447 Force enabling SwiftCompilerSources in the build
This means that `bootstrapping=off` cannot be used anymore.
2024-05-06 17:22:27 +02:00
Alastair Houghton
3627507eb1 [Build] Further static Linux SDK support changes.
Fix some indentation issues.

Change `build-script-impl` to make `build-linux-static` a positive argument.

Fix documentation for `--linux-archs` and `--linux-static-archs` (the options
are comma separated for `build-script`, but semicolon separated for
`build-script-impl`).

Set the default for `linux-static-archs` to `x86_64, aarch64` so that we
install the expected content in the toolchain.

Add missing default for `test_linux_static`.

Make sure to pass down `--skip-build-linux` and `--build-linux-static`.

Factor out config file generation and call it from the install step in `llvm.py`
as well as from the build step.

rdar://123503470
2024-05-03 09:12:49 +01:00
Alastair Houghton
bac73d012a [Build] Add options to the Python build script tests.
Apparently I'd failed to add a couple of lines here.

rdar://123503470
2024-05-02 14:56:18 +01:00
Alastair Houghton
fdc8ffd36f [Build] Updated following initial comments from Eric.
Change the `--linux[-static]-arch` option to `--linux[-static]-archs`, on the
basis that it supports multiple values.

Other tidying.

rdar://123503470
2024-05-02 14:56:18 +01:00
Alastair Houghton
ae1c0455f3 [Build] Add the new fully-static Linux SDK.
Declare a new `LINUX_STATIC` SDK and configure it.

Add options to set the build architectures for the `LINUX` and
`LINUX_STATIC` SDKs, similar to what we have for Darwin, because
we'll be cross-compiling.

Also add an option to point the build system at the sources for
the musl C library, which we're using for `LINUX_STATIC`.

rdar://123503470
2024-05-02 14:56:18 +01:00
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
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
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
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
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
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
Hamish Knight
74dd4dcb1b Enable colors in FileCheck and Swift tests
If we're attached to a tty, pass `--color` to
FileCheck and `--color-diagnostics` to Swift
invocations in tests.
2024-02-09 16:47:03 +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
Alejandro Alonso
b68e864b5f Try to appease CI
more test fixes
2024-01-03 13:01:24 -05:00
Alex Hoppen
04f950c084 [build] Verify that SourceKit-LSP is correctly formatted
In sourcekit-lsp and swift-format, run swift-format on the sourcekit-lsp sources to make sure it’s correctly formatted.
2023-10-31 17:10:51 -07:00
Alex Hoppen
12b500878c Merge pull request #69388 from ahoppen/ahoppen/remove-swiftevolve
[build] Remove swiftevolve
2023-10-25 12:43:14 -07:00
Yuta Saito
1e5f69b3ee Merge pull request #69101 from kateinoigakukun/yt/wasm-stdlib-product-pr
[wasm][build] Build stdlib and test IRGen for WebAssembly
2023-10-24 22:23:54 -07:00
Alex Hoppen
6a8ad4b91e [build] Remove swiftevolve
swift-evolve hasn’t been used in the recent past. @beccadax and I agreed that it doesn’t provide any value anymore to keep swift-evolve around. In Becca’s words:

> The resilience implementation is pretty stable at this point, and it never seems to have had many of the bugs that swift-evolve would have been able to shake out.
2023-10-24 18:36:59 -07:00
Yuta Saito
e1c4eceea3 [wasm][build] Build and test stdlib for WebAssembly
This patch adds a new build products to build and test the Swift stdlib
for WebAssembly.
This adds WebAssembly specific stdlib product instead of adding the new
target in `stdlib-deployment-targets` because unlike darwin platforms
Wasm target has quite different stdlib configuration from host target
and there is no way to specify different stdlib configuration for each
target in `stdlib-deployment-targets` for now.

This patch adds 1 new dependency `wasi-libc` and 3 new build products:
1. `WASILibc` - wasi-libc is a libc implementation for WebAssembly
   System Interface (WASI). This product is required to build the
   compiler runtimes and Swift stdlib.
2. `WasmLLVMRuntimeLibs` - This product builds `./runtimes` directory
   in llvm-project, which contains compiler-rt, libcxx and libcxxabi.
   This product is required to build Swift stdlib.
3. `WasmStdlib` - This product builds standalone Swift stdlib for
   WebAssembly. (Similar to `MinimalStdlib` product, but configured for
   WebAssembly target)
2023-10-23 17:34:20 +00:00
Yuta Saito
b18c548e43 Enable WebAssembly target in LLVM backend by default 2023-09-26 21:30:35 +00: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
futurejones
edda8747eb add RISCV as llvm target to build 2023-06-16 17:19:34 +09:00
Alex Lorenz
5f7f5daa52 [cxx-interop] add a build setting to control whether the <swift/bridging> header is shipped with compiler
rdar://109050483
2023-05-08 15:59:38 -07:00
Saleem Abdulrasool
f11617392e build: enable control over the C++ interop modules
Treat the C++ interop modules similar to the Concurrency and
StringProcessing modules, enabled through a top-level global flag.  The
flag now enables disabling the C++ interop modules when the standard
library is built.

Based on the original work by Egor Zhdan!
2023-04-26 11:22:28 -07:00
Alex Hoppen
5321be217b [SwiftSyntax] Enable test fuzzing for SwiftSyntax PR job
Companion of https://github.com/apple/swift-syntax/pull/1340
2023-04-13 18:32:59 -07:00
Alex Hoppen
86ecac5041 [Build] Enable RawSyntaxValidation for SwiftSyntax PR job 2023-04-06 09:59:15 -07:00
Alastair Houghton
316dfaffa1 Merge pull request #64714 from al45tair/eng/PR-107360391
[Backtracing] Support specifying a hard-coded path for swift-backtrace.
2023-03-30 18:28:48 +01:00
Alastair Houghton
0261a29fee [Backtracing] Support specifying a hard-coded path for swift-backtrace.
Add a way to disable dynamic lookup of the backtracer path, for situations
where a hard-coded path makes more sense.

rdar://107360391
2023-03-29 15:08:48 +01:00
Kuba (Brecka) Mracek
1a3cbfab7c Add MinimalStdlib build-script product, build is in main CI jobs and PR testing jobs (#64492) 2023-03-28 10:29:34 -07:00
Alejandro Alonso
09b1476ddf Stop building Reflection 2023-03-14 11:49:38 -07:00
Alastair Houghton
106dd1956e [Backtracing] Fix test failures.
I'd inserted an extra line, which upset the line numbers in the backtracing
tests.

Also tweak the Python build script tests slightly so they work.

rdar://106234311
2023-03-06 11:28:16 +00:00
Alastair Houghton
1258d45152 [Backtracing] Build work.
Additional shimming required for some builds, as well as a few other build
related tweaks.

rdar://106234311
2023-03-04 15:46:30 +00:00
Philippe Hausler
8a7f6009b9 Initial draft of observation 2023-02-27 17:09:00 -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