Commit Graph

433 Commits

Author SHA1 Message Date
Slava Pestov
3d7888cc00 stdlib: Enable -requirement-machine-protocol-signatures=verify
Fixes rdar://problem/46313629.
2022-02-04 19:10:59 -05:00
Kuba Mracek
33c53ef51b Fix missing quotes in CMake for SWIFT_STDLIB_DISABLE_INSTANTIATION_CACHES 2022-02-04 09:32:08 -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
b97795df26 Merge pull request #41158 from Azoy/fix-linux-warnings
[cmake] Fix availability macro warnings when bootstrapping
2022-02-02 22:22:59 -08:00
Kuba (Brecka) Mracek
e6a1e23a9f Add SWIFT_STDLIB_ENABLE_VECTOR_TYPES to take away support for SIMD (#41149) 2022-02-02 12:06:45 -08:00
Alejandro Alonso
531202dde3 Fix warnings for availability macros 2022-02-02 11:09:30 -08:00
Eric Miotto
2daff9fef3 Merge pull request #40840 from edymtt/move-more-options-to-stdliboptions
Migrate more options to `StdlibOptions.cmake`
2022-01-14 13:27:47 -08:00
nate-chandler
ac30d865b3 Merge pull request #40556 from nate-chandler/copy_propagation/always-on
Always enable copy propagation.
2022-01-14 12:22:04 -08:00
Eric Miotto
447a1673d5 Migrate more options to StdlibOptions.cmake
At the same time, convert the conditions that test for Darwin platforms
to use `SWIFT_DARWIN_PLATFORMS` instead.

Addresses rdar://87147214
2022-01-13 10:45:48 -08:00
Eric Miotto
7c63b8a02a Merge pull request #40756 from edymtt/add-precondition-for-swift-darwin-platforms
Ensure `SWIFT_DARWIN_PLATFORMS` is defined when loading stdlib options
2022-01-11 07:54:51 -08:00
Eric Miotto
b0ed4900b7 Merge pull request #40768 from edymtt/polish-bitcode-conditions
[gardening] align platform checks when enabling bitcode inclusion
2022-01-10 12:14:44 -08:00
Eric Miotto
3b82dc008c [gardening] align platform checks when enabling bitcode inclusion
* use quoted arguments when referencing "SWIFTLIB_SINGLE_SDK"
* break the first condition on multiple lines

This will make changes to these conditions easier to review.
2022-01-07 12:15:14 -08:00
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
swift-ci
bebe119eda Merge pull request #40573 from Catfish-Man/unicodectomy 2022-01-06 17:33:39 -08:00
Eric Miotto
b349f0953b Ensure SWIFT_DARWIN_PLATFORMS is defined when loading stdlib options
This was missed when working on #40723 and will prevent
`SWIFT_STDLIB_HAS_ASL` having a wrong default.
2022-01-06 12:51:14 -08:00
Eric Miotto
127528a3d0 Move more Standard Library options to dedicated file (#40723)
This addresses most of the options with computed defaults.

Addresses rdar://86723940
2022-01-06 07:12:18 -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
Eric Miotto
526e77cbe3 Migrate options from stdlib/CMakeLists.txt into dedicated file (#40640)
Focus on options that are not defined in `StandaloneOverlay.cmake` and
which defaults are not computed.

Addresses rdar://86723819
2021-12-23 07:10:04 -08:00
Erik Eckstein
ba364a17ef libswift: rename cmake targets and functions
libswift -> swiftCompilerModules or swiftCompilerSources
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
David Smith
f1a5e27821 Add a build flag to disable building Unicode support 2021-12-21 17:26:15 -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
Saleem Abdulrasool
6f22916a63 Merge pull request #40637 from compnerd/libswift
build: allow building libswift for Windows
2021-12-21 12:39:31 -06:00
Saleem Abdulrasool
bd9b42772d build: allow building libswift for Windows
There is no special environment variable to be set, the dlls must be
co-located or be found in `Path`.
2021-12-20 09:07:44 -08:00
Eric Miotto
871c6b9b6c [CMake] Begin moving Standard Library options in a separate file (#40610)
This allows the file to be easily included where needed (e.g.
`StandaloneOverlay.cmake`) and reduce the likelihood of miscompilation
due to missing sensible defaults.

As a start, focus on a handful of parameters that got added/modified in
recent PRs.

Addresses rdar://85978195
2021-12-20 07:36:27 -08:00
Nate Chandler
b887def407 [stdlib] Only emit lexical markers.
Don't use lexical lifetimes fully in the stdlib for now.
2021-12-16 15:29:34 -08:00
Kuba (Brecka) Mracek
b48e148fed Merge pull request #40204 from kubamracek/swift_stdlib_support_back_deployment
Rename SWIFT_ENABLE_COMPATIBILITY_OVERRIDES -> SWIFT_STDLIB_SUPPORT_BACK_DEPLOYMENT and avoid building more back-deployment stdlib parts when not set
2021-12-15 07:03:56 -08:00
Alastair Houghton
0e5a620917 Merge pull request #40331 from al45tair/problem/84393438
[Runtime] Don't use threading APIs when building single threaded.
2021-12-14 22:19:20 +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
Alejandro Alonso
8a5f728daf Merge pull request #40340 from Azoy/drop-icu
[stdlib] Drop ICU
2021-12-07 01:44:38 -08:00
eeckstein
1b2ac8cccb Merge pull request #40277 from buttaface/boot
libswift: add support for Android and OpenBSD in the CMake config
2021-12-06 20:10:31 +01: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
Butta
4c493ef5d3 libswift: add support for Android and OpenBSD in the CMake config
Add a new libswift build mode for cross-compilation in the process, that currently
only works for non-Darwin hosts.
2021-12-01 15:27:40 +05:30
Alejandro Alonso
86fec4011d Cleanup more of the build from Saleem's comments 2021-11-30 15:01:20 -08:00
Alejandro Alonso
21ee3a5e0f Drop ICU
update freestanding deps
2021-11-30 13:53:08 -08:00
Alastair Houghton
2d335062e2 [Runtime] Don't use threading related APIs when building single threaded.
Mostly this consists of #if-ing out code that we don't need when running
single threaded.

rdar://84393438
2021-11-30 16:18:26 +00: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
Kuba (Brecka) Mracek
66bd5e6a39 Add ASTMangler.AllowStandardSubstitutions to allow using a stripped-down libswiftCore (#40009) 2021-11-15 15:40:35 -08:00
Kuba (Brecka) Mracek
c63a93c37a Add SWIFT_STDLIB_EXTRA_SWIFT_COMPILE_FLAGS and SWIFT_STDLIB_EXTRA_C_COMPILE_FLAGS CMake options (#40171) 2021-11-15 10:27:50 -08:00
Erik Eckstein
09552abc44 libswift: improve the bootstrapping-with-hostlibs build mode
Don't build the swiftCore module files in the bootstrapping phases. Instead use the module files in the SDK.
This reduces the build time overhead from 3min -> 30seconds.
2021-11-05 18:32:25 +01:00
Kuba (Brecka) Mracek
367b4c1355 Enable -experimental-hermetic-seal-at-link for the stdlib on 'freestanding' (#39961) 2021-11-02 10:05:33 -07:00
Karoy Lorentey
2732765096 [CMake] Introduce availability macros for all known stdlib releases
Introduce "SwiftStdlib x.y"-style availability macros for all known releases of the stdlib, adding them to the swift flags of all Swift libraries and tests.
2021-10-28 18:31:54 -07:00
Doug Gregor
c9e1032480 Remove underscores from CFBundleIdentifier of libraries.
Underscores aren't permitted in these identifiers.
Fixes rdar://84645973.
2021-10-26 20:57:19 -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
Kuba (Brecka) Mracek
99a24d47be Introduce a CMake flag to disable fast-path context descriptor lookup based on short manglings (#39729) 2021-10-14 08:08:07 -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