Commit Graph

308 Commits

Author SHA1 Message Date
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
50e9ae3ea3 spelling: unsupported
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-09-15 19:43:37 -04: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
6c79195119 spelling: nonsensical
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-09-15 19:43:37 -04:00
Josh Soref
ca76e2c101 spelling: migrate
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-09-15 19:43:37 -04:00
Josh Soref
aaf1ddc101 spelling: inherits
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
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