Disabling a few tests. The distributed tests are failing for the same
reason they fail on Linux, the rpaths and library search paths are
mucked up. Fixing that shouldn't be too hard, but should be enabled on
both platforms at once.
CollectiveTransformers doesn't work because it imports Darwin directly.
There is a note that is several years old saying that we should port the
test to the other platforms, but that is beyond the scope of this PR at
the moment.
This gives us a means to use llvm's intrinsics that implement more niche
SIMD instructions from the standard library, where we cannot use the C
intrinsics headers from clang (because they're in the cpp module).
Find all the usages of `--enable-experimental-feature` or
`--enable-upcoming-feature` in the tests and replace some of the
`REQUIRES: asserts` to use `REQUIRES: swift-feature-Foo` instead, which
should correctly apply to depending on the asserts/noasserts mode of the
toolchain for each feature.
Remove some comments that talked about enabling asserts since they don't
apply anymore (but I might had miss some).
All this was done with an automated script, so some formatting weirdness
might happen, but I hope I fixed most of those.
There might be some tests that were `REQUIRES: asserts` that might run
in `noasserts` toolchains now. This will normally be because their
feature went from experimental to upcoming/base and the tests were not
updated.
`Builtin.FixedArray<let N: Int, T: ~Copyable & ~Escapable>` has the layout of `N` elements of type `T` laid out
sequentially in memory (with the tail padding of every element occupied by the array). This provides a primitive
on which the standard library `Vector` type can be built.
* Bug fixes and improvements for DoubleWidth prototype
Previously multipliedReportingOverflow and masking shifts were implemented incorrectly for signed types and non-power-of-two bitWidths, respectively. Address those two bugs and additional implement &+, &-, and &*.
* Restore line accidentally deleted
This attribute can be attached to a noncopyable struct to specify that its
storage is raw, meaning the type definition is (with some limitations)
able to do as it pleases with the storage. This provides a basis for
implementing types for things like atomics, locks, and data structures
that use inline storage to store conditionally-initialized values.
The example in `test/Prototypes/UnfairLock.swift` demonstrates the use
of a raw layout type to wrap Darwin's `os_unfair_lock` APIs, allowing
a lock value to be stored inside of classes or other types without
needing a separate allocation, and using the borrow model to enforce
safe access to lock-guarded storage.
- #58975 switched many tests from XFAIL on linux to linux-gnu, so seven
fail on the Android CI and two natively. They are now explicitly excluded.
- #39605 added several C++ Interop tests, 11 of which fail on the Android CI,
so disable them for now.
- #42478 removed the @noescape attribute for the non-Android
SIL/clang-function-types tests, so I remove it for Android too.
- My pull #40779 moved the Swift pointer tags to the second byte, so
SILOptimizer/concat_string_literals.64 will need to be updated for that,
disabled it for now.
- Compiler-rt moved the directory in which it places those libraries for
Android, llvm/llvm-project@a68ccba, so lit.cfg is updated for that.
lit.py currently allows any substring of `target_triple` to be used as a
feature in REQUIRES/UNSUPPORTED/XFAIL. This results in various forms of
the OS spread across the tests and is also somewhat confusing since they
aren't actually listed in the available features.
Modify all OS-related features to use the `OS=` version that Swift adds
instead. We can later remove `config.target_triple` so that these don't
the non-OS versions don't work in the first place.
This would fail in asserts builds because the GSB produced an invalid
minimal signature. It now started failing in noassert builds as well
because we cross-check generic signatures against the Requirement
Machine.
Instead run this test with the Requirement Machine enabled unconditionally
since it works now.
This replaces swiftMSVCRT with swiftCRT. The big difference here is
that the `visualc` module is no longer imported nor exported. The
`visualc` module remains in use for a singular test wrt availability,
but this should effectively remove the need for the `visualc` module.
The difference between the MSVCRT and ucrt module was not well
understood by most. MSVCRT provided ucrt AND visualc, combining pieces
of the old MSVCRT and the newer ucrt. The ucrt module is what you
really wanted most of the time, however, would need to use MSVCRT for
the convenience aliases for type-generic math and the deprecated math
constants.
Unfortunately, we cannot shadow the `ucrt` module and create a Swift SDK
overlay for ucrt as that seems to result in circular dependencies when
processing the `_Concurrency` module.
Although this makes using the C library easier for most people, it has a
more important subtle change: it cleaves the dependency on visualc.
This means that this enables use of Swift without Visual Studio for the
singular purpose of providing 3 header files. Additionally, it removes
the need for the installation of 2 of the 4 support files. This greatly
simplifies the deployment process on Windows.
Building the file with asserts crashes the compiler. Building the file
with no_asserts does *not* crash the compiler.
For non-Windows platforms, it is sufficient to `XFAIL: asserts`.
That does not work on Windows thanks to Python < 3: the crash is not
handled by lit's `not` there as it is on other platforms. To handle the
expected crash on Windows when building with asserts, not --crash is
required. However on other platforms, not --crash breaks the test in
no_asserts builds.
Here, a version of the test's run script specialized for Windows is
broken out into a separate BigInt-windows.swift file.
rdar://problem/65251059
Clean up a few general patterns that are now obviated by canImport
This aligns more generally with the cleanup that the Swift Package
Manager has already done in their automated XCTest-plumbing tool in
apple/swift-package-manager#1826.
These tests are marked XFAIL or UNSUPPORTED because either the tests:
require libc annotation, require Mach-O support, don't recognize calls to
swift-autolink-extract, requires porting alongside Linux, or rely on simd
which is not present.
Additionally, explicit REQUIRES for tsan/asan/fuzzer are added to some
tests, since OpenBSD does not support these sanitizers or fuzzers, since
it's nicer to mark that with REQUIRES rather than XFAIL.
This commit focuses the basics: setting up the relevant stanzas in
lit.cfg and adding platform conditionals for importing Glibc. Future
commits will deal with other portability fixes.
The test cannot run on simulator since it requires a "future" target--in
this case watchOS 9.99 which is inherently beyond what any simulator is
running.
Regardless of any flags, the stdlib will have its generic metadata
prespecialized.
Temporarily reintroduced the flag to enable the feature flag while
preserving the flag to disable it and changed the default back to off
for the moment.
The test relies on new runtime functionality that is by definition not
available in the stdlib in the OS. Here, the test is marked as
unsupported run running using the OS' stdlib.
rdar://problem/59425215
When a specialized usage of a generic enum occurs in the same module
where the enum was defined, directly reference the prespecialized
metadata.
rdar://problem/56994321
We want to eventually remove address phi arguments from SIL. This will enable
all sorts of nice IRGen optimizations and in general make life better. We are
not there yet, but given that is the direction we are going in, I don't think
there is much use in having to implement this sort of checking for SIL phi
arguments.
rdar://50676315