Commit Graph

1333 Commits

Author SHA1 Message Date
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
Jonas Devlieghere
8198d82845 [utils] Set CMAKE_OSX_DEPLOYMENT_TARGET for LLDB 2021-07-12 11:36:36 -07:00
Eric Miotto
376b6f20eb Implement differently logic to strip and copy the tvos libraries 2021-07-05 13:50:39 -07:00
Eric Miotto
245db5371d Strip i386 arch from tvOS compiler-rt lib (if present)
This is to avoid the following issue when generating toolchains for
macOS

```
ld: building for tvOS, but linking in object file built for tvOS
Simulator, file '/tmp/strip.mgCPcB' for architecture i386
fatal error:
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip:
internal link edit command failed
```

This reverts commit 8470faf309, #37929

Addresses rdar://80098850
2021-07-05 10:50:29 -07:00
Min-Yih Hsu
4ec8ee8b90 Merge pull request #38167 from mshockwave/dev-sil-deserialize
[SIL][Frontend] Simplify debug info generation flow for SIL files
2021-07-01 10:08:22 -07:00
Min-Yih Hsu
d00a6cc0e3 [SIL][Frontend] Simplify debug info generation flow for SIL files
- If any of the `-g<kind>` flag is given -- except `-gnone`, debug
   info will be printed into every generated SIL files.
 - The `-gsil` is deprecated in favor of `-sil-based-debuginfo`. The
   SILDebugInfoGenerator Pass now generates intermediate SIL file with
   name "<output file>.sil_dbg_<n>.sil". Other functionalities of that
   Pass remain the same.
2021-06-30 17:21:58 -07:00
Butta
a4ff4db508 [build] Add the flags to enable cross-compiling the corelibs
Pass the Swift and CMake flags needed to cross-compile Foundation and so on, with
the first example of Android. Add a new flag, --cross-compile-deps-path, which is
used to search for cross-compiled libraries, like libcurl, that the corelibs
depend on. Also add a new flag, --common-swift-flags, to pass additional Swift
flags to the corelibs.
2021-06-29 06:41:41 +05:30
Mishal Shah
8470faf309 Revert "Strip i386 arch from tvOS simulator lib" 2021-06-15 11:34:49 -07:00
Mishal Shah
a8ae401d0a Strip i386 arch from tvOS simulator lib 2021-06-11 17:25:25 -07:00
Mishal Shah
5a7b8c7922 Merge pull request #37823 from apple/xcode-13-beta-main
[main] Support Xcode 13 beta
2021-06-10 09:21:09 -07:00