Commit Graph

409 Commits

Author SHA1 Message Date
Richard Wei
7244f780e6 Remove -disable-implicit-distributed-module-import.
Distributed is never implicitly imported.
2022-04-22 16:01:02 -07:00
Richard Wei
8e19cea55d Prepare to enable string processing by default.
This is some groundwork to make it possible to flip the `-enable-experimental-string-processing` flag on by default if and when it passes Swift Evolution. This PR itself do **not** change the defaults.

- Do not implicitly import _StringProcessing when building a module interface.
- Do not implicitly import _StringProcessing when core libraries, same as _Concurrency.
2022-04-22 15:46:06 -07:00
Josh Soref
644c18ca9b Spelling stdlib (#42444)
* spelling: against

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: algorithmic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: alignment

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: anything

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: architectural

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: architecture

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: are

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: artificial

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: aside

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: available

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: being

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: bidirectional

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: characters

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: circular

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: compatibility

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: compiled

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: correctly

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: covers

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: declaration

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dependencies

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: descriptor

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dictionaries

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dynamic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: greater

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: hierarchy

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: immortal

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: initialize

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: initializes

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: iterable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: message

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: minimum

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: multiple

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: originally

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: simplified

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: sophisticated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: trivia

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: wasn't

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2022-04-19 14:02:43 -07:00
Xi Ge
f7f7baa874 cmake: specify stdlib and overlays with an API library-level 2022-04-10 19:34:23 -07:00
Slava Pestov
ed23f4fd9d Merge pull request #42113 from slavapestov/gsb-off
Turn off the GenericSignatureBuilder
2022-04-02 11:04:24 -04:00
Slava Pestov
703d89c8bd Turn off the GenericSignatureBuilder
The Requirement Machine has been enabled in 'verify' mode for a while,
where we run both the GenericSignatureBuilder and Requirement Machine
minimization algorithm and compare the results, with the
GenericSignatureBuilder being used to emit diagnostics.

Now, it's time to flip the flags to 'enabled' mode, where the
GenericSignatureBuilder doesn't run at all, and the Requirement Machine
emits diagnostics. This finally allows us to realize the correctness
and performance gains from using the Requirement Machine.

See https://forums.swift.org/t/the-requirement-machine-a-new-generics-implementation-based-on-term-rewriting/55601/9
for details.

Correctness:

- https://bugs.swift.org/browse/SR-7353
- https://bugs.swift.org/browse/SR-9595
- https://bugs.swift.org/browse/SR-10532
- https://bugs.swift.org/browse/SR-10752
- https://bugs.swift.org/browse/SR-11100
- https://bugs.swift.org/browse/SR-11532
- https://bugs.swift.org/browse/SR-11997
- https://bugs.swift.org/browse/SR-12120
- https://bugs.swift.org/browse/SR-12736
- https://bugs.swift.org/browse/SR-12980
- https://bugs.swift.org/browse/SR-13018
- https://bugs.swift.org/browse/SR-13491
- https://bugs.swift.org/browse/SR-13502
- https://bugs.swift.org/browse/SR-14484
- https://bugs.swift.org/browse/SR-14485
- https://bugs.swift.org/browse/SR-14659
- https://bugs.swift.org/browse/SR-14776
- https://bugs.swift.org/browse/SR-14917
- https://bugs.swift.org/browse/SR-15009
- https://bugs.swift.org/browse/SR-15790
- https://bugs.swift.org/browse/SR-15920
- rdar://25065503
- rdar://39225307
- rdar://44590919
- rdar://45957015
- rdar://50169558
- rdar://51068593
- rdar://52921168
- rdar://54394068
- rdar://55758433
- rdar://58455439
- rdar://59132837
- rdar://62894047
- rdar://64953119
- rdar://65015626
- rdar://65558829
- rdar://68084643
- rdar://68376692
- rdar://75329340
- rdar://76646764
- rdar://77683844
- rdar://77794156
- rdar://78233378
- rdar://78481510
- rdar://78643612
- rdar://80820294
- rdar://81276358
- rdar://81425392
- rdar://83308672
- rdar://83373331
- rdar://83848546
- rdar://83955123
- rdar://88514540
- rdar://89641532
- rdar://90264856
- rdar://90343419

Performance:

- rdar://33654588
- rdar://47821930
- rdar://51908331
- rdar://59037195
- rdar://65131776
- rdar://73771235
- rdar://75188696

GSB crashes with no reduced test case that are likely fixed:

- https://bugs.swift.org/browse/SR-4872
- rdar://32144681
- rdar://42376632
- rdar://46270030
- rdar://47199993
- rdar://48648900
- rdar://49535930
- rdar://49712445
- rdar://49712637
- rdar://49713096
- rdar://49713107
- rdar://60334839
- rdar://66593156
- rdar://68982368
- rdar://76706682
- rdar://77794745
- rdar://84724541
2022-04-02 01:55:21 -04:00
Yuta Saito
8c598e98f7 [Wasm][Runtime] Interpret absolute function pointer in runtime structures
When SWIFT_COMPACT_ABSOLUTE_FUNCTION_POINTER is enabled, relative direct
pointers whose pointees are functions will be turned into absolute
pointer at compile-time.
2022-04-02 04:32:41 +00:00
Erik Eckstein
76f21b9510 cmake: fix the library search path for bootstrapping libraries
Don't add the architecture to the library search path, because the output path also doesn't contain the architecture (for bootstrapping libraries)

rdar://90025270
2022-03-28 15:20:16 +02:00
David Smith
c05e47dd60 Only use SIMD when stdlib vector types are available 2022-03-22 15:48:24 -07:00
Slava Pestov
ae2feb5d8e Merge pull request #41663 from slavapestov/rqm-enable-stdlib-inferred-signatures
stdlib: Build with -requirement-machine-inferred-signatures=verify
2022-03-17 23:41:46 -04:00
swift-ci
704c7e1c74 Merge pull request #41764 from ktoso/wip-flag-module
[Distributed] rename _Distributed to module
2022-03-15 19:40:36 -07:00
Konrad `ktoso` Malawski
8c13370242 [Distributed] rename _Distributed to underscoreless module 2022-03-16 08:35:35 +09:00
Allan Shortlidge
b47d43638e CMake: Add -target-min-inlining-version min to the Swift standard library build's arguments. This will prevent issues with incorrect or missing availability checking in inlinable function bodies.
Resolves rdar://89991736
2022-03-15 13:08:07 -07:00
Alastair Houghton
f204f0634b Add a build option for the concurrency tracing feature.
Concurrency tracing was enabled depending on the presence of a header
file, but if a similarly named header was found somewhere in the path
that didn't do the same thing, that might cause problems.

Instead, we should have a build time configuration option.

rdar://89787540
2022-03-09 12:53:10 +00:00
Slava Pestov
2028a030f5 stdlib: Build with -requirement-machine-inferred-signatures=verify 2022-03-08 15:57:19 -05:00
Slava Pestov
8d81d46a8f stdlib: Don't explicitly pass requirement machine flags that are on by default 2022-03-07 23:20:41 -05:00
Alsey Coleman Miller
b85e673a78 [stdlib] Added Armv5 support 2022-03-06 00:56:32 -05:00
Slava Pestov
f53756aebb stdlib: Build with -requirement-machine-abstract-signatures=verify 2022-03-02 17:42:40 -05:00
Saleem Abdulrasool
b81024cf95 build: adjust the flags addition for the standard library
The standard library cannot be built with MSVC's compiler.  However, if
it is built with the toolchain which uses MSVC, it would fail to add
this flag.  With recent VS2022 toolsets, this is a problem as we would
fail to be able to use the `offsetof` macro.  Unconditionally apply the
definition when building the standard library.
2022-02-21 10:58:46 -08:00
Michael Gottesman
7f02653a99 Merge pull request #41327 from gottesmm/pr-5939707c6d758909b99bd67cd865a5f1adf02128
Rather than turning off sil-verify-all on all stdlib builds... Re-enable it only on the macOS x86_64 platform.
2022-02-19 20:41:40 -08:00
Kuba (Brecka) Mracek
9b661aa2fe Specify missing dependencies on swift_static .swiftmodule files (#41320) 2022-02-11 18:04:25 -08:00
Michael Gottesman
392e02d58f Rather than turning off sil-verify-all on all stdlib builds... Re-enable it only on the macOS x86_64 platform.
Most of the stdlibs at the SIL level are the same so by not verifying them all,
we aren't losing that much coverage. This gives us back some of the coverage we
lost when we disabled -sil-verify-all everywhere without causing us to have the
huge slow down when building multiple stdlibs.
2022-02-10 17:16:04 -08:00
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
c257709223 On Darwin, pass LIBLTO_PATH to 'ar' and 'lipo' commands from CMake (#41243) 2022-02-08 04:51:50 -08:00
Kuba (Brecka) Mracek
be9d93fbe2 Enable -reflection-metadata-for-debugger-only for the freestanding stdlib (#41168) 2022-02-07 15:00:14 -08:00
Slava Pestov
3a4bb96e40 Merge pull request #41200 from slavapestov/enable-rqm-protocols-for-stdlib
Enable RequirementMachine for the standard library's protocol signatures
2022-02-04 22:45:21 -05:00
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