Commit Graph

189 Commits

Author SHA1 Message Date
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
Alex Hoppen
a1a0cadb56 [build] Verify that SwiftSyntax is correctly formatted
In SwiftSyntax and swift-format, run swift-format on SwiftSyntax to make sure it’s correctly formatted.
2022-12-14 23:14:46 +01:00
Dario Rexin
55c0084b9e [Build] Use llvm-cmake-flags in llvm build-script product
rdar://102476062
2022-11-17 10:56:57 -08:00
Dario Rexin
f63de71001 Merge pull request #38507 from drexin/wip-llvm-build-script
[Build] Make LLVM a build-script product
2022-11-16 20:44:13 -08:00
Robert Widmann
2d07f382c5 Delete _InternalSwiftSyntaxParser And Its Build Infrastructure
This is the start of the removal of the C++ implementation of libSyntax
in favor of the new Swift Parser and Swift Syntax libraries. Now that
the Swift Parser has switched the SwiftSyntaxParser library over to
being a thin wrapper around the Swift Parser, there is no longer any
reason we need to retain any libSyntax infrastructure in the swift
compiler.

As a first step, delete the infrastructure that builds
lib_InternalSwiftSyntaxParser and convert any scripts that mention
it to instead mention the static mirror libraries. The --swiftsyntax
build-script flag has been retained and will now just execute the
SwiftSyntax and Swift Parser builds with the just-built tools.
2022-11-02 10:35:29 -07:00
Dario Rexin
3f80cb6712 [Build] Make LLVM a build-script product
rdar://80733826
2022-10-30 22:47:29 -07:00
Alex Hoppen
4512cb0981 Build swift-format as part of CI testing
Build swift-format whenever SwiftSyntax is being built and install it whenever sourcekit-lsp is installed.
2022-10-27 09:24:36 +02:00
Doug Gregor
ca2b39387f Default to building the early SwiftSyntax package.
One can disable this with `build-script --skip-early-swiftsyntax`.
2022-09-20 15:22:07 -07:00
Doug Gregor
2b5f9015f1 Revert "Default to building the early SwiftSyntax package." 2022-09-20 11:49:22 -07:00
Allan Shortlidge
238270f34c Merge pull request #42458 from jsoref/spelling-utils
Spelling utils
2022-09-20 09:34:55 -07:00
Doug Gregor
de35614428 Default to building the early SwiftSyntax package.
One can disable this with `build-script --skip-early-swiftsyntax`.
2022-09-18 14:33:28 -07:00
Josh Soref
c81cad6537 spelling: predefined
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-09-15 19:43:37 -04:00
Josh Soref
01bde495ef spelling: forwarded
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-09-15 19:43:37 -04:00
Hamish Knight
cfda4b1764 [build-script] Allow specifying the number of lit workers
Allow tests to run with a different number of
workers than build jobs if desired.
2022-09-14 14:01:49 +01:00
Doug Gregor
98e50258b8 Merge pull request #60814 from DougGregor/build-early-swiftsyntax
[build-script] Support building "early" SwiftSyntax via `--early-swiftsyntax`
2022-08-27 23:01:25 -07:00
Doug Gregor
e771660526 [build-script] Support building "early" SwiftSyntax via --early-swiftsyntax
Similar to the way the early Swift Driver is built, introduce a
build-script option `--early-swiftsyntax` that uses the host Swift and
CMake to build the parts of the swift-syntax package that are expected
to become be used in the compiler.

Note that this does not obviate the need for the `--swiftsyntax`
option, because that build product uses the just-built Swift compiler
and SwiftPM to build, test, and install everything from the
swift-syntax package.
2022-08-27 00:06:09 -07:00
Eric Miotto
c954130be0 Add a flag to infer appropriate cross compile hosts on Darwin
Addresses rdar://98787335, apple#60348
2022-08-22 09:37:52 -07:00
Mishal Shah
b41c31397e Remove test_ios_32bit_simulator from expected options 2022-08-03 00:58:39 -07:00
Mishal Shah
196ee143c5 Xcode 14 beta 4 no longer supports iOS armv7, armv7s, and i386 architectures
> Building iOS projects with deployment targets for the armv7, armv7s, and i386 architectures is no longer supported. (92831716)
2022-08-02 20:42:08 -07:00
Mishal Shah
d5ff3960f4 Disable running watchOS simulator (32-bit) test by default 2022-06-16 00:36:21 -07:00
Alex Hoppen
e2012dddf3 Merge pull request #41314 from ahoppen/pr/build-lld
[build-script] Add option to build lld as part of LLVM
2022-05-25 07:58:54 +02:00
Daniel Duan
3dfc40898c [NFC] Remove Python 2 imports from __future__ (#42086)
The `__future__` we relied on is now,  where the 3 specific things are
all included [since Python 3.0](https://docs.python.org/3/library/__future__.html):

* absolute_import
* print_function
* unicode_literals
* division

These import statements are no-ops and are no longer necessary.
2022-04-13 14:01:30 -07:00
Alex Hoppen
e313df88ce [build-script] Add option to build lld as part of LLVM 2022-04-12 16:38:34 +02:00
Evan Wilde
ef8c14996d Add curl build product
Add libcurl as a build product. This is another piece required to build
foundation in a freestanding configuration.
2022-04-11 20:39:33 -07:00
Evan Wilde
d7184742de Add zlib build product
This patch adds a zlib and static-zlib build product, respectively
producing a dynamic and static zlib library. This is a dependency of
building Foundation.
2022-04-11 20:39:32 -07:00
Evan Wilde
91578162e1 Add libxml2 build product
This patch adds the libxml2 build product as a dependency of building
foundation.
2022-04-11 20:39:32 -07:00
Eric Miotto
f417630054 Add option to reduce build times when using ThinLTO and ld64 (#41058)
Internal configurations targeting Darwin employ ThinLTO to
improve compiler performance, however using it on all executable
causes build time to increase with no matching benefit.

To reduce build times in such configurations, we allow some
ancillary targets to opt out of LLVM IR optimizations when linking
ThinLTO with ld64 (e.g. tools used for bootstrapping or debugging the
Swift compiler) -- this behaviour is opt in through a new flag
`--swift-tools-ld64-lto-codegen-only-for-supporting-targets`.

Addresses rdar://76702687
2022-02-09 08:22:02 -08:00
Butta
3e7717673d [build] Add a flag that allows disabling appending the host target's name to the install-destdir for a cross-compiled toolchain
This is useful if you're cross-compiling the toolchain for a single host and don't
want your specified install path modified.
2022-01-17 22:57:48 +05:30
David Smith
a10d98e6fe Fix Python tests for new build flag 2022-01-05 12:40:06 -08:00