Commit Graph

300 Commits

Author SHA1 Message Date
Josh Soref
01bde495ef spelling: forwarded
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-09-15 19:43:37 -04:00
Josh Soref
062f196339 spelling: display
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
67b23d7d45 Merge pull request #60664 from edymtt/infer-cross-compile-hosts-on-darwin
Add a flag to infer appropriate cross compile hosts on Darwin
2022-08-23 07:04:36 -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
YOCKOW
d10381557b [NFC] Python Lint: Fix E275(missing whitespace after keyword) issues. 2022-08-21 16:07:07 +09: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
Caleb Meurer
7d50071c32 [cxx-interop] Fix typo unkwon -> unknown 2022-05-16 16:46:45 -06:00
Eric Miotto
ed696240cf Use collections.abc.Iterable instead of collection.Iterable
The latter is no longer present in Python 3.10+.

Addresses #58714
2022-05-06 10:00:28 -07: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
Daniel Duan
025079466a [utils] Remove Python 2
The library `six` provides compatibility between Python 2, and 3. It's no
longer necessary once we migrate of Python 2 completely.

Also remove any custom logic for Python 2 (the ones referenced by
a commentanyways).

https://bugs.swift.org/browse/SR-16025
2022-03-20 13:22:04 -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
David Smith
48399afb03 Merge branch 'main' into unicodectomy 2022-01-03 22:57:37 -08:00
Saleem Abdulrasool
d1bb98b11e Merge pull request #40625 from buttaface/droid-remove-icu
[android] Remove ICU build flags since that requirement was dropped in #40340
2021-12-23 09:31:05 -06:00
Erik Eckstein
3d33f11e6c cmake/build-script: rename the libswift option to "bootstrapping"
In cmake, rename LIBSWIFT_BUILD_MODE to BOOTSTRAPPING_MODE.
Also, rename the lit feature "libswift" to "swift_in_compiler".
2021-12-22 11:31:52 +01:00
David Smith
f1a5e27821 Add a build flag to disable building Unicode support 2021-12-21 17:26:15 -08:00
Butta
a3ea28ff19 [android] Remove ICU build flags since that requirement was dropped in #40340 2021-12-20 12:06:13 +05:30
Eric Miotto
fb2ecaa8e2 Add an option to not build the private part of the Standard Library (#40548)
This can be useful to reduce build times in certain configurations (e.g.
when we don't run tests).

Addresses rdar://86474460
2021-12-16 15:37:45 -08:00
Alex Hoppen
b8e6efd36f Merge pull request #40283 from ahoppen/pr/expand-preset-option-name
[build-presets] Support expansion of preset option names
2021-12-14 22:32:56 +01:00
Michael Gottesman
1ba8317de9 Merge pull request #36917 from buttaface/swiftpm
[build] Allow cross-compiling build-script products for non-Darwin hosts too
2021-12-11 13:03:13 -08:00
Eric Miotto
403ccd4072 Extend freestanding to support targeting Darwin platforms (#40202)
* add an option to add freestanding to the Darwin platform, so that
  to get expected compile behaviours (e.g. setting the install name)
* rework testing configuration to relax assumptions about freestanding
* add a preset to test such configuration (at least for PR testing)

Addresses rdar://85465396
2021-12-08 07:09:44 -08:00
Butta
ec43ef1b37 [build] Allow cross-compiling build-script products for non-Darwin hosts too
To that end, move the --cross-compile-deps-path flag from build-script-impl to a
publicly documented build-script flag and use it for build-script products'
library dependencies too. Generate a SPM destination JSON file that can be used
both for cross-compiling these build-script products and by users for their own
Swift packages.

Also, add a native_toolchain_path() method, that uses a prebuilt toolchain if
available, and pass an install prefix in to swift-driver and sourcekit-lsp.
2021-12-08 13:52:28 +05:30
David Smith
fc3e718771 Initial support for compile-time generation of vprintf format strings, behind the SWIFT_STDLIB_STATIC_PRINT flag 2021-12-02 16:58:36 -08:00
Alex Hoppen
e3ab0ee351 [build-presets] Support expansion of preset option names
This allows me to selectively enable build features (such as building lldb, building swiftpm reconfiguring etc.) locally from a single preset.
2021-12-02 17:39:45 +01:00
Richard Wei
65bffd7ad7 Add _MatchingEngine and _StringProcessing modules.
These modules are part of the experimental declarative string processing feature. If accepted to the Standard Library, _StringProcessing will be available via implicit import just like _Concurrency, though _MatchingEngine will still be hidden as an implementation detail.

`_MatchingEngine` will contain the general-purpose pattern matching engine ISA, bytecode, and executor. `_StringProcessing` will contain regular expression and pattern matching APIs whose implementation depends on the matching engine..

Also consolidates frontend flag `-enable-experimental-regex` as `-enable-experimental-string-processing`.

Resolves rdar://85478647.
2021-11-19 09:27:33 -08:00
buttaface
30c292ca87 [android] Update to NDK 23b (#39921)
The latest Long Term Support NDK finally removed binutils, including the bfd/gold
linkers and libgcc. This simplifies our Android support, including making lld the
default linker for Android. Disable three reflection tests that now fail, likely
related to issues with swift-reflection-dump and switching to lld.
2021-11-17 20:58:42 -08:00
Cassie Jones
fbbbf4ec6c [build-script] Update ClangVersionType to match SwiftVersionType
SwiftVersionType needs 5 components, and ClangVersionType needs to match
SwiftVersionType because some build automation wants to mark the clang
version as being the same as the Swift version while generating version
numbers.

Fixes rdar://85508050
2021-11-17 12:50:04 -05:00
Ethan Kusters
6fff54d215 Use swift-docc-render-artifact instead of building swift-docc-render 2021-10-19 17:26:02 -07:00
David Rönnqvist
f662d50684 Add build script products for Swift-DocC and Swift-DocC-Render
(rdar://79703353)
2021-10-13 12:36:28 -07:00
Erik Eckstein
af71088d29 libswift: bootstrapping build
Adding build modes for libswift: off, hosttools, bootstrapping, bootstrapping-with-hostlibs
The two bootstrapping modes are new. For details see libswift/README.md
2021-09-28 18:51:42 +02:00
Michael Gottesman
8794dd1003 [build-script] Add an option for cleaning the install destdir
Useful to make sure that one is not hitting weird behavior due to a stale just
built toolchain.
2021-09-02 12:25:40 -07:00
swift-ci
0c122a514f Merge pull request #38673 from buttaface/skip-clean 2021-08-30 16:27:14 -07:00
Doug Gregor
aa3e7fb7d2 Fix Python linting/testing issues 2021-08-27 13:03:42 -07:00
Doug Gregor
6d6c2e69bf [build-script] Add --install-back-deploy-concurrency.
Allow the installation of the back-deployment shared libraries for
concurrency via build-script.
2021-08-27 08:58:52 -07:00
Doug Gregor
602937d06c Clean up build-script test failures and linter errors 2021-08-26 08:49:44 -07:00
Butta
9d1736c123 [build] Add flags to allow skipping rebuilding the corelibs
Add three new flags, '--skip-clean-libdispatch', '--skip-clean-foundation', and
'--skip-clean-xctest', that leave the previous builds of those products in place.
2021-08-16 17:19:56 +05:30
Dario Rexin
3331529f4c [Build] Fix --skip-test-cmark
rdar://79094449
2021-06-09 13:45:37 -07:00
Konrad `ktoso` Malawski
6008b32789 [Distributed] initial distributed support, fixed availability (#37650)
* [Distributed] Initial distributed checking

* [Distributed] initial types shapes and conform to DistributedActor

* [Distributed] Require Codable params and return types

* [Distributed] initial synthesis of fields and constructors

* [Distributed] Field and initializer synthesis

* [Distributed] Codable requirement on distributed funcs; also handle <T: Codable>

* [Distributed] handle generic type params which are Codable in dist func

[Distributed] conformsToProtocol after all

* [Distributed] Implement remote flag on actors

* Implement remote flag on actors

* add test

* actor initializer that sets remote flag

[Distributed] conformances getting there

* [Distributed] dont require async throws; cleanup compile tests

* [Distributed] do not synthesize default implicit init, only our special ones

* [Distributed] properly synth inits and properties; mark actorTransport as _distributedActorIndependent

Also:

- do not synthesize default init() initializer for dist actor

* [Distributed] init(transport:) designated and typechecking

* [Distributed] dist actor initializers MUST delegate to local-init

* [Distributed] check if any ctors in delegation call init(transport:)

* [Distributed] check init(transport:) delegation through many inits; ban invoking init(resolve:using:) explicitly

* [Distributed] disable IRGen test for now

* [Distributed] Rebase cleanups

* [Concurrent] transport and address are concurrent value

* [Distributed] introduce -enable-experimental-distributed flag

* rebase adjustments again

* rebase again...

* [Distributed] distributed functions are implicitly async+throws outside the actor

* [Distributed] implicitly throwing and async distributed funcs

* remove printlns

* add more checks to implicit function test

* [Distributed] resolve initializer now marks the isRemote actor flag

* [Distributed] distributedActor_destroy invoked instead, rather than before normal

* [Distributed] Generate distributed thunk for actors

* [distributed] typechecking for _remote_ functions existing, add tests for remote funcs

* adding one XFAIL'ed task & actor lifetime test

The `executor_deinit1` test fails 100% of the time
(from what I've seen) so I thought we could track
and see when/if someone happens to fix this bug.

Also, added extra coverage for #36298 via `executor_deinit2`

* Fix a memory issue with actors in the runtime system, by @phausler

* add new test that now passes because of patch by @phausler

See previous commit in this PR.
Test is based on one from rdar://74281361

* fix all tests that require the _remote_ function stubs

* Do not infer @actorIndependent onto `let` decls

* REVERT_ME: remove some tests that hacky workarounds will fail

* another flaky test, help build toolchain

* [Distributed] experimental distributed implies experimental concurrency

* [Distributed] Allow distributed function that are not marked async or throws

* [Distributed] make attrs SIMPLE to get serialization generated

* [Distributed] ActorAddress must be Hashable

* [Distributed] Implement transport.actorReady call in local init

* cleanup after rebase

* [Distributed] add availability attributes to all distributed actor code

* cleanup - this fixed some things

* fixing up

* fixing up

* [Distributed] introduce new Distributed module

* [Distributed] diagnose when missing 'import _Distributed'

* [Distributed] make all tests import the module

* more docs on address

* [Distributed] fixup merge issues

* cleanup: remove unnecessary code for now SIMPLE attribute

* fix: fix getActorIsolationOfContext

* [Distributed] cmake: depend on _concurrency module

* fixing tests...

* Revert "another flaky test, help build toolchain"

This reverts commit 83ae6654dd.

* remove xfail

* clenup some IR and SIL tests

* cleanup

* [Distributed] fix cmake test and ScanDependencies/can_import_with_map.swift

* [Distributed] fix flags/build tests

* cleanup: use isDistributed wherever possible

* [Distributed] don't import Dispatch in tests

* dont link distributed in stdlib unittest

* trying always append distributed module

* cleanups

* [Distributed] move all tests to Distributed/ directory

* [lit] try to fix lit test discovery

* [Distributed] update tests after diagnostics for implicit async changed

* [Distributed] Disable remote func tests on Windows for now

* Review cleanups

* [Distributed] fix typo, fixes Concurrency/actor_isolation_objc.swift

* [Distributed] attributes are DistributedOnly (only)

* cleanup

* [Distributed] cleanup: rely on DistributedOnly for guarding the keyword

* Update include/swift/AST/ActorIsolation.h

Co-authored-by: Doug Gregor <dgregor@apple.com>

* introduce isAnyThunk, minor cleanup

* wip

* [Distributed] move some type checking to TypeCheckDistributed.cpp

* [TypeCheckAttr] remove extra debug info

* [Distributed/AutoDiff] fix SILDeclRef creation which caused AutoDiff issue

* cleanups

* [lit] remove json import from lit test suite, not needed after all

* [Distributed] distributed functions only in DistributedActor protocols

* [Distributed] fix flag overlap & build setting

* [Distributed] Simplify noteIsolatedActorMember to not take bool distributed param

* [Distributed] make __isRemote not public

* [Distributed] Fix availability and remove actor class tests

* [actorIndependent] do not apply actorIndependent implicitly to values where it would be illegal to apply

* [Distributed] disable tests until issue fixed

Co-authored-by: Dario Rexin <drexin@apple.com>
Co-authored-by: Kavon Farvardin <kfarvardin@apple.com>
Co-authored-by: Doug Gregor <dgregor@apple.com>
2021-05-28 07:22:03 +09:00
Dario Rexin
7cfabf51f1 Revert "Revert "[Build] Make cmark build a build-script product (#37102)""
This reverts commit 3150086b0f.
2021-05-24 07:03:12 -07:00