Commit Graph

1342 Commits

Author SHA1 Message Date
Michael Gottesman
59feb67645 [build-script] Add support for running sil-verify-all only on macOS x86_64.
This will let us save some build time without losing the coverage of
sil-verify-all everywhere since much of the code in all of the stdlibs are the
same.
2022-02-10 12:08:03 -08:00
Kuba (Brecka) Mracek
d2957338f8 Set SWIFT_STDLIB_ENABLE_VECTOR_TYPES=0 for the freestanding stdlib (#41169) 2022-02-06 07:47:57 -08:00
Mishal Shah
54c24dc7c6 [Build System] Add support to log build times for each products 2022-02-04 18:13:30 -08:00
Kuba (Brecka) Mracek
05a17cc622 Enable -disable-preallocated-instantiation-caches for the freestanding stdlib (#41170) 2022-02-04 06:53:32 -08:00
Alejandro Alonso
5aa88660fe Explicitly pass ICU_DATA_LIBRARY when building foundation 2022-01-27 10:29:49 -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
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
Kuba (Brecka) Mracek
5076af2ae4 Add a codesize check of the freestanding/minimal stdlib to prevent large codesize regressions (#40653) 2022-01-05 15:12:02 -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
Kuba (Brecka) Mracek
663a6fb771 Introduce SWIFT_STDLIB_HAS_TYPE_PRINTING flag to remove the ability to print types at runtime (to save codesize) (#40649) 2021-12-21 17:47:54 -08:00
Kuba (Brecka) Mracek
f7291f0b21 Add SWIFT_STDLIB_HAS_LOCALE CMake to build stdlib without locale.h and locale based float parsing (#40405) 2021-12-21 11:22:54 -08:00
Butta
a3ea28ff19 [android] Remove ICU build flags since that requirement was dropped in #40340 2021-12-20 12:06:13 +05:30
Richard Wei
3650c55555 CI workaround: Disable string processing if repo is not checked out. 2021-12-19 11:14:27 -08:00
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
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
Kuba Mracek
d441f85358 Rename SWIFT_ENABLE_COMPATIBILITY_OVERRIDES -> SWIFT_STDLIB_SUPPORT_BACK_DEPLOYMENT and avoid building more back-deployment stdlib parts when not set 2021-12-14 09:59:44 -08:00
Connor Wakamo
190f69a9ae Merge pull request #40229 from cwakamo/eng/PR-85511320-skip-install-merge-lipo-fix
[build-script-impl] Move a skip install check earlier so it affects the merge-lipo action.

This addresses <rdar://problem/85511320>.
2021-12-07 09:58:43 -08:00
Kuba (Brecka) Mracek
748099c226 Merge pull request #40426 from kubamracek/promote-cmake-options
Promote some stdlib/swift CMake flags into build-script settings
2021-12-07 05:45:18 -08:00
Alejandro Alonso
8a5f728daf Merge pull request #40340 from Azoy/drop-icu
[stdlib] Drop ICU
2021-12-07 01:44:38 -08:00
buttaface
0674594ebf build: disable building the test binaries when cross-compiling the host tools (#40375)
Building the tests has been disabled when cross-compiling the toolchain almost from the beginning, but #39130 enabled building the test binaries by default again, so I had to locally disable building those tests when cross-compiling a standalone stdlib for Android.
2021-12-07 10:05:44 +01:00
Alejandro Alonso
6e0cf0e7be Add --enable-rpath to ICU's build
Remove ICU_DATA flags
2021-12-06 13:16:32 -08:00
Kuba Mracek
d531d9eda8 Promote some stdlib/swift CMake flags into build-script settings 2021-12-06 00:17:57 -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
Connor Wakamo
c0d5284c9a [build-script-impl] Move a skip install check earlier so it affects the merge-lipo action.
This allows `SKIP_LOCAL_HOST_INSTALL` to actually affect the merge-lipo action.
This in turn permits cross-compilation which doesn't want the local host's tools installed to generate a DSTROOT without a `merged-hosts` directory reliably.

This addresses <rdar://problem/85511320>.
2021-11-17 11:55:50 -08:00
Erik Eckstein
90eaff04f1 libswift: on macOS, make the default build mode bootstrapping-with-hostlibs
This is much faster than the full "bootstrapping" mode.
On linux, the default stays "bootstrapping", because "bootstrapping-with-hostlibs" is not supported.

In CI:
* Build two presets with "bootstrapping", so that this mode is tested on macOS at least on some bots.
* Do the macOS smoke test also with "bootstrapping-with-hostlibs". It only adds ~30 sec compared to "hosttools" which was used previously.
2021-11-10 13:38:47 +01:00
swift-ci
37de862c78 Merge pull request #39975 from eltociear/patch-24 2021-11-05 15:05:31 -07:00
Erik Eckstein
116a5b04a6 build: enable libswift bootstrapping by default
But use the "hosttools" mode for build presets, which compile tools in "Debug" configuration (to reduce build time).
2021-11-03 09:38:55 +01:00
Ikko Ashimine
ecbd65985e Fix typo in build-script-impl
runing -> running
2021-10-29 18:28:04 +09: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
Kuba (Brecka) Mracek
557bf685be Don't include support for old mangling in runtimes without ObjC interop (#39675) 2021-10-13 19:47:05 -07:00
Kuba (Brecka) Mracek
7538949859 Split out CommandLine enum into a separate static library, allow removing it from stdlib (#39591)
This is for the 'freestanding' build to stop assuming the platform has argc/argv.

- Introduce a new sub-library, libswiftCommandLineSupport.a
- Move stubs/CommandLine.cpp into this library
- Conditionally embed it into libswiftCore
- Conditionally embed it into libswiftPrivateLibcExtras if not in libswiftCore to support testing
- Add SWIFT_STDLIB_HAS_COMMANDLINE CMake (and build-script) flag
2021-10-13 07:02:43 -07:00
Kuba (Brecka) Mracek
c2c1bfb053 Add SWIFT_STDLIB_HAS_ENVIRON to remove usage of getenv/environ from stdlib (#39599) 2021-10-12 07:16:36 -07:00
Kuba (Brecka) Mracek
653642df75 Add a SWIFT_STDLIB_HAS_DARWIN_ASL config flag to allow removing asl_log() usage in freestanding build (#39584) 2021-10-12 07:14:33 -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
Kuba (Brecka) Mracek
ca0dff803b Turn existing ifdefs around backtrace() API into a CMake SWIFT_SUPPORTS_BACKTRACE_REPORTING flag (#39598) 2021-10-06 14:46:08 -07:00
Kuba (Brecka) Mracek
25e18e9a5c Enable LTO on the stdlib for the 'minimal' preset (#39292) 2021-10-05 07:38:01 -07:00
Erik Eckstein
eb9621fe86 stdlib: add a build-script option --enable-array-cow-checks to enable compilation of COW checks.
And set this option in various presets for buildbots.

Don't enable the checks by default because when linking against the OS library (which does not support COW checking) it will result in unresolved symbol errors.
So far it was handled by an availability checks against 9999 (which was a hack), but this does not work anymore.

Note, all this is only relevant for assert builds of the stdlib.

rdar://83673798
2021-09-30 18:06:52 +02:00
Kuba (Brecka) Mracek
c2a92722c6 Split the NO_DYLD CMake flag into separate HAS_DLADDR and STATIC_IMAGE_INSPECTION flags (#39339) 2021-09-29 19:57:05 -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
Kuba (Brecka) Mracek
6766824d51 Add a SWIFT_STDLIB_HAS_STDIN flag to compile out the Swift.readLine() API from the stdlib (for the 'freestanding' preset) (#39332) 2021-09-17 10:42:14 -07:00
Kuba (Brecka) Mracek
404badb49a Introduce SWIFT_ENABLE_REFLECTION to turn on/off the support for Mirrors and reflection (#33617) 2021-09-08 13:08:13 -07:00
Michael Gottesman
8109819e21 [build-script-impl] Do not actually try to extract symbols when we perform a dry-run.
Otherwise, we can't successfully dry-run a toolchain on darwin.

I added an option enable-extract-symbol-dry-run-test that can be set to restore
the previous behavior and updating the BuildSystem unit tests that depend on
that behavior to pass that flag.
2021-08-31 16:57:13 -07:00
swift-ci
0c122a514f Merge pull request #38673 from buttaface/skip-clean 2021-08-30 16:27:14 -07:00
Kuba (Brecka) Mracek
aaff37ffb8 Add a SWIFT_STDLIB_HAS_DARWIN_LIBMALLOC flag to allow/disallow uses of Darwin libmalloc APIs (malloc_default_zone, malloc_zone_malloc, etc.) (#33812) 2021-08-23 19:37:43 -07:00
Kuba (Brecka) Mracek
750ba09ef4 Introduce SWIFT_FREESTANDING_FLAVOR to select whether the FREESTANDING stdlib should be built/tested using an Apple SDK, or another SDK (e.g. Linux, not implemented yet) (#34450) 2021-08-19 15:56:04 -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