Commit Graph

638 Commits

Author SHA1 Message Date
Eric Miotto
339d49cf3c Amend path to compiler-rt sources 2022-02-03 12:59:07 -08:00
Eric Miotto
0537d209fd Invoke correct CMake when building tsan libdispatch
This should address a build failure on TSAN - libdispatch Linux bots

Addresses rdar://88339546
2022-02-01 12:57:48 -08:00
Ikko Ashimine
114e5d1deb [build] Fix typo in host_specific_configuration.py
seperate -> separate
2022-01-28 01:07:02 +09:00
Max Desiatov
28c92b61cc swift_build_support: fix build -> built typo 2022-01-25 11:39:49 +00: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
Robert Widmann
9429514268 Merge pull request #40659 from buttaface/stdlib-remove-icu
[build] Remove last vestiges of ICU for anything other than Foundation
2022-01-07 00:36:13 -08:00
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
Butta
2890d15da7 [build] Remove last vestiges of ICU for anything other than Foundation 2021-12-25 21:16:34 +05:30
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
Rob Prentiss
d39de7fa52 Merge pull request #40615 from jorng/swift_build_support_filter
Use list comprehension for filter in swift_build_support
2021-12-20 14:31:31 -08:00
Butta
a3ea28ff19 [android] Remove ICU build flags since that requirement was dropped in #40340 2021-12-20 12:06:13 +05:30
Michael Ilseman
7bff9da67d Revert "Revert "Merge pull request #40595 from hamishknight/straw-bales"" 2021-12-19 10:08:48 -07:00
Arnold Schwaighofer
9511994e52 Revert "Merge pull request #40595 from hamishknight/straw-bales"
This reverts commit a67a0436f7, reversing
changes made to 9965df76d0.

This commit or the earlier commit this commit is based on (#40531) broke the
incremental bot.
2021-12-18 11:02:37 -08:00
Rob Prentiss
ec6bc59509 Use list comprehension for filter
In python3, 'filter' returns an interable which doesn't support using
'len()'. This switches to a list comprehension, so that we can check the
length of 'enabled_pipeline'.

This is required to move build-script to Python3.
2021-12-17 12:14:02 -08:00
Richard Wei
300cbaba31 Integrate experimental string processing modules and enable end-to-end regex.
- Checkout apple/swift-experimental-string-processing using a tag.
- Build `_MatchingEngine` as part of libswift (`ExperimentalRegex`) using sources from the package.
- Parse regex literals using the parser from `_MatchingEngine`.
- Build both `_MatchingEngine` and `_StringProcessing` as part of core libs using sources from the package.
- Use `Regex<DynamicCaptures>` as the default regex type until we finalize apple/swift-experimental-string-processing#68.
2021-12-17 10:33:07 +00:00
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
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
e9eb3b06c1 [build] Switch get_install_destdir() and other duplicated logic to the new host_install_destdir() 2021-12-08 13:52:29 +05:30
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
Mishal Shah
465f9690df Revert "build-swift: Explicitly use python3" 2021-12-03 14:29:36 -08:00
swift-ci
7b2eb1f821 Merge pull request #39987 from Catfish-Man/printf-in-this-economy 2021-12-03 05:23:56 -08:00
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
Rob Prentiss
8e9e11c31d Use list comprehension for filter
In python3, 'filter' returns an interable which doesn't support using
'len()'. This switches to a list comprehension, so that we can check the
length of 'enabled_pipeline'.

This is required to move build-swift to Python3.
2021-12-01 10:56:56 -08:00
Gwynne Raskind
00b95911fe While we're at it, when echoing output from shell.run(), echo the command that's running _before_ executing it instead of after so the user can actually see what's going on instead of getting confused by the ordering of the output after the fact. 2021-11-26 12:11:58 -06:00
Gwynne Raskind
900a8e27b1 Fix input environment not being respected by shell.run() 2021-11-26 11:45:06 -06: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
Franklin Schrans
0a04ccec1b Merge pull request #39723 from d-ronnqvist/add-docc-in-build-script
[BuildScript] Add products for Swift-DocC and Swift-DocC-Render
2021-11-02 09:55:17 +00:00
Ethan Kusters
4d7383366b Add get_dependencies method to Swift-DocC-Render script
Adding the required `get_dependencies` class method should resolve the remaining test failures we're seeing for macOS toolchain builds.
2021-10-29 14:11:32 -07:00
Doug Gregor
6d0abdf1da Fix infernal Python linter warnings 2021-10-26 22:18:43 -07:00
Doug Gregor
7591d44996 Propagate Swift version information to the back-deployed binaries 2021-10-26 20:58:06 -07:00
Ethan Kusters
6fff54d215 Use swift-docc-render-artifact instead of building swift-docc-render 2021-10-19 17:26:02 -07:00
Saleem Abdulrasool
15a5d2c54b Revert "[android] Update to NDK 23" 2021-10-16 11:07:23 -07:00
swift-ci
46f3cc9dd8 Merge pull request #39045 from buttaface/android-ndk-23 2021-10-15 20:55:19 -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
Butta
7fa1b4b2ac [android] Update to NDK 23
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.

Also, add the libatomic dependency for Android armv7, just as on linux.
2021-10-12 12:37:01 +05:30
Alex Hoppen
fb7a5b8a38 [BuildScript] Don't install SwiftSyntax
Instead, link all binaries in the toolchain using SwiftSyntax (currently only `sk-stress-test`) should link to the binary statically. This simplifies the way SwiftSyntax is built and at the same time slightly reduces the toolchain size.
2021-10-11 22:04:11 +02:00
Eric Miotto
a0c6367145 Address Python lint issue in unrelated file 2021-10-01 15:09:41 -07:00
Eric Miotto
6fbc9623fb Don't include tests for back deploy concurrency product
Addresses rdar://83777172
2021-10-01 12:30:45 -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
Max Desiatov
b1236e92f9 swift_build_support: Add WASI to StdlibDeploymentTarget (#39244)
This change adds support for WASI to `StdlibDeploymentTarget` in `swift_build_support/targets.py`. This will allow us to build stdlib for WASI in the future.

Related to SR-9307.
2021-09-27 17:59:38 +01:00
Zoe Carver
9313efc911 Merge pull request #39353 from zoecarver/allow-cmake-swift-override
[build] Allow `CMAKE_Swift_COMPILER` to be overriden.
2021-09-21 20:02:47 -04:00
zoecarver
5d2dd07eff [build] Allow CMAKE_Swift_COMPILER to be overriden.
If `CMAKE_Swift_COMPILER` is defined, the build script will now use that.
2021-09-17 17:05:39 -07:00
Karoy Lorentey
e73ef1fd87 [benchmark] Set SWIFT_DETERMINISTIC_HASHING while running benchmarks in regular smoke tests 2021-09-16 20:23:32 -07:00
Doug Gregor
0068722088 Fix the host-specific installation destdir for build-script products.
Prior to this, build-script products that build in the host-specific
directories for cross-compilation would get the wrong path, and
therefore wouldn't get picked up in toolchain builds.
2021-09-10 20:54:46 -07:00
Doug Gregor
d52d4d56af Fix Python lint warning 2021-09-09 14:57:08 -07:00