Commit Graph

819 Commits

Author SHA1 Message Date
Henrik G. Olsson
38620d49b1 [utils] integrate update-verify-tests with lit's --update-tests
This adds a lit plugin wrapping the core of update-verify-tests. When
lit is invoked with --update-tests it will call the plugin, which checks
if the failure is due to a -verify mismatch. If it is, it tries to
repair the test. If the source file was originally created by
split-file, the changes are propagated to the parent file.

No tests are added, because I don't want to run nested llvm-lit tests
in Swift's test suite, but the core functionality is tested through
update-verify-tests.py.
2025-11-11 16:33:43 -08:00
Henrik G. Olsson
8bff12a580 [utils] port update-verify-tests to Swift's -verify
This ports clang's test suite for update-verify-tests from C to Swift,
and adjusts update-verify-tests as needed. The main differences are the
Swift -verify output format being quite different, as well as Swift's
'-verify-additional-prefix foo' working differently than clang's
'-verify=foo'.
2025-11-05 16:02:06 -08:00
Nate Chandler
66c001ef53 [Lit] Add CHECK-%vendor to IRGenFileCheck. 2025-10-30 03:59:18 -07:00
Henrik G. Olsson
de49d687b0 add swift-function-caller-generator
This helper utility takes a module interface as input, and emits a Swift
file importing the module and calling every function in the module. It's
intended for testing of safe interop wrappers to make sure they go
through the entire pipeline of the compiler instead of succumbing to
laziness.
2025-10-17 15:13:55 -07:00
Henrik G. Olsson
2fceb9a41d Merge pull request #84863 from ramonasuncion/test-moduleinterface-replace-find
[Test][ModuleInterface] Replace find with find_files utility
2025-10-15 23:30:37 -07:00
Henrik G. Olsson
81f1e75b4f Merge pull request #84843 from hnrklssn/filecheck-sanitize-tmp-dir
[Utils] Sanitize %t with PathSanitizingFileCheck
2025-10-15 15:43:58 -07:00
Ramon Asuncion
f99260cfa7 [Test][ModuleInterface] Replace find with find_files utility 2025-10-13 10:49:09 -07:00
Henrik G. Olsson
72099f2093 [Utils] Sanitize %t with PathSanitizingFileCheck
This adds sanitizing of the expansion of the `%t` temp dir to
PathSanitizingFileCheck. Because the expansion of this path is different
for each test case, lit.cfg cannot use the expanded version. Instead it
relies on lit expanding the `%t` substring. This requires path
normalization to occur in PathSanitizingFileCheck instead of lit.cfg.
All strings matching the expansion of `%t` are now replaced with
`TMP_DIR`. This is especially useful when source files are created in
`%t` using `split-file`.

Also sorts the patterns to sanitize based on length, to guarantee that
patterns that are substrings of some other pattern are always tested
after the longer patterns has already been tested. Otherwise the longer
pattern may never match.
2025-10-12 14:33:58 -07:00
Alastair Houghton
5202a7d84b [Test] Fix StdlibDeploymentTarget for non-macOS cases.
We should be using `run_vers`, not `platform.mac_ver()[0]`.

rdar://159238613
2025-10-10 11:15:51 +01:00
Mishal Shah
03a599c5be Merge pull request #84606 from swiftlang/rebranch
Merge clang 21.x rebranch into main
2025-10-02 20:17:05 -07:00
Henrik G. Olsson
af3a5d8b21 Merge pull request #84607 from ramonasuncion/fix-use-env-liblto
Set LIBLTO_PATH with env in lit.cfg
2025-10-01 18:52:21 -07:00
Daniel Rodríguez Troitiño
01ed0c10c2 [test] Fix compatibility span calculation for unified builds (#84600)
In unified builds `swift_obj_root` is in a different place in the CMake
build tree, so using it as the base for finding `lib` is not correct.

Change the usage of `swift_obj_root/lib` for `config.swift_lib_dir`
which should be correct in both unified and non-unified builds.
2025-09-30 23:13:31 -07:00
Ramon Asuncion
e9fa8fe4b8 Set LIBLTO_PATH with env in lit.cfg 2025-09-30 20:23:30 -07:00
swift-ci
78735b2bd2 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-30 15:14:59 -07:00
Ramon Asuncion
3a21c45e1b Fix output path substitution in %target-build-swift-dylib 2025-09-30 09:19:56 -07:00
Ramon Asuncion
c85f8b7eb1 Add comments explaining regex capture groups in lit.cfg 2025-09-30 06:37:53 -07:00
Ramon Asuncion
dc879cc25e Update %target-build-swift-dylib regex to handle backslashes
Supports Windows-style paths
2025-09-30 06:35:28 -07:00
Ramon Asuncion
c964411764 Rework lit.cfg regex to avoid basename subshell in substituion
Changed %target-build-swift-dylib\(([^)]+)\) to
%target-build-swift-dylib\(([^)]+?)([^/()]+)\)

Group 1 now captures the "prefix" and group 2 captures the final word

Captured the basename directly in the regex instead of using a subshell since
Lit's internal shell does not support
2025-09-29 19:46:46 -07:00
swift-ci
2375909628 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-17 02:20:18 -07:00
Henrik G. Olsson
8bc46a6a62 [Utils] Add support for lit's --update-tests to run-test
This flag checks for known test patterns in failed tests, and tries to
automatically update the test to pass.
2025-09-16 20:53:23 -07:00
Adrian Prantl
75bee892be Add LLDB and swift-reflection-dump support for WebAssembly
This patch adds parsing and extracting of the Swift reflection
metadata data segments from within the WebAssembly DATA section and
tests it using swift-reflection-dump. This is needed to allow LLDB to
acces Swift reflection metadata when attached to WebAssembly
processes.

rdar://159217213
2025-08-27 17:14:17 -07:00
Kavon Farvardin
6cb38edad4 Merge pull request #83622 from kavon/kavon/test-opaque-values
test: provide an opaque-values testing mode
2025-08-12 19:57:57 -07:00
Kavon Farvardin
c3e0ce5bb6 test: provide an opaque-values testing mode
Introduces a new build-script flag `--test-optimize-none-with-opaque-values`
and build targets like `check-swift-optimize_none_with_opaque_values` that
runs the execution_test's while compiling them with -enable-sil-opaque-values.

This mode is quite useful while working to bring-up opaque values.
2025-08-12 15:07:40 -07:00
Eric Miotto
15e723810f lit.cfg: copy compatibility span dylib when appropriate on Darwin
This supports back deployment bots.

Addresses rdar://155841483
2025-08-11 14:12:26 -07:00
Evan Wilde
1f06214ce6 Tests: Use variant module triple
This switches from using lit.cfg to attempt to recompute the module
triple to using the triple computed in CMake to ensure consistency.
This is a better source of truth than having many sources everywhere.

In case anyone sees this and is wondering, the "target triple" refers to
the triple that the compiler is built for, while the "variant triple"
refers to the platform that the tests and runtimes are built for.
2025-08-06 18:06:34 -07:00
Eric Miotto
556bd5ffb2 lit.cfg: copy back deployed concurrency library from Xcode
We are no longer building it with `build-script`.

Addresses rdar://157495803
2025-08-04 13:19:28 -07:00
Allan Shortlidge
e8ced33b81 swift-symbolgraph-extract: Infer target triple.
Infer the `-target` argument to `swift-synthesize-interface` to be the host
triple when unspecified instead of emitting an error.
2025-07-28 12:43:37 -07:00
Allan Shortlidge
3ffb218e9a swift-synthesize-interface: Infer target triple.
Infer the `-target` argument to `swift-synthesize-interface` to be the host
triple when unspecified instead of emitting an error.

Resolves rdar://156353450.
2025-07-28 12:42:57 -07:00
Max Desiatov
f20417c55a Enable concurrency-deleted-method.swift test for wasip1 (#83236)
The test is only partially enabled: we only check for IR correctness and correct linking. We don't run the tests on WASI yet due to unrelated issues that are going to be resolved separately.
2025-07-25 16:24:32 -07:00
Max Desiatov
67c4be0ac2 Update tests for wasi -> wasip1 triple change
Fixes a regression introduced with https://github.com/swiftlang/swift/pull/83167
2025-07-23 10:10:47 +01:00
Max Desiatov
03f7ebc890 test/CMakeLists.txt: run Embedded Swift for Wasm tests
Run new `check-swift-embedded-wasi` target from `test/CMakeLists.txt`, tweak `lit.cfg` to support both `-wasi` and `-wasip1` triples, exclude unsupported tests based on `CPU=wasm32` instead of `OS=wasi`.
2025-07-23 10:10:47 +01:00
Max Desiatov
de5aa3f2ba lit.cfg: fix test subset error message (#82806)
Currently when test subset is not specified, `lit.cfg` provides an error message that refers to test modes instead of tests subsets. Making error messages distinct makes it easier to backtrack in lit.cfg source code when diagnosing the root cause.
2025-07-04 16:06:24 -07:00
Max Desiatov
27e5d5c551 Fix/xfail/disable remaining tests for embedded Wasm 2025-07-01 11:43:43 +01:00
QuietMisdreavus
1948907eb3 use RespectOriginallyDefinedIn when mangling extension contexts (#82348)
Resolves rdar://152598492

Consider the following Swift, adapted from a real-world framework:

```swift
@available(macOS 10.8, *)
@_originallyDefinedIn(module: "another", macOS 11.0)
public struct SimpleStruct {}

@available(macOS 12.0, iOS 13.0, *)
public extension SimpleStruct {
    struct InnerStruct {}
}
```

In this scenario, `SimpleStruct` was originally in a module called
`another`, but was migrated to this module around the time of macOS
11.0. Since then, the module was ported to iOS and gained a nested type
`SimpleStruct.InnerStruct`. When mangling USRs for this nested type, the
result differs depending on whether we're targeting macOS or iOS.
They're mostly the same, but the macOS build yields a USR with an `AAE`
infix, designating that the `InnerStruct` was defined in an extension
from a module with the name of the base module. On iOS, this infix does
not exist.

The reason this is happening is because of the implementation of
`getAlternateModuleName` checking the availability spec in the
`@_originallyDefinedIn` attribute against the currently active target.
If the target matches the spec, then the alternate module name is
reported, otherwise the real module name is. Since the iOS build reports
the real module name, the mangling code doesn't bother including the
extension-context infix, instead just opting to include the parent
type's name and moving on.

This PR routes around this issue by passing the
`RespectOriginallyDefinedIn` variable to the
`ExtensionDecl::isInSameDefiningModule` method, and using that to skip
the alternate module name entirely. It also sets
`RespectOriginallyDefinedIn` to `false` in more places when mangling
USRs, but i'm not 100% confident that it was all necessary. The goal was
to make USRs more consistent across platforms, regardless of the
surrounding context.
2025-06-30 12:57:12 -06:00
Evan Wilde
12e784c3c8 Replace sftp_server with rsync
remote-run uses rsync instead of sftp server. Some of the tests were
incorrectly labelled as requiring sftp server. Fixed those and replaced
the requirement with rsync.
2025-06-25 13:39:01 -07:00
Alastair Houghton
42ca1b1cc8 Rename SwiftStdlibCurrentOS to StdlibDeploymentTarget.
`StdlibDeploymentTarget` seems to be a better name.

rdar://152498657
2025-06-04 10:40:19 +01:00
Alastair Houghton
d5ed335339 Merge pull request #81440 from al45tair/currentos-availability
[Concurrency][Stdlib] Add SwiftStdlibCurrentOS availability, use it.
2025-06-03 15:01:22 +01:00
Anthony Latsis
402ace5b68 [test] lit.cfg: Wrap all substitutions with capture group refs in SubstituteCaptures
Since https://github.com/llvm/llvm-project/pull/103042, backslashes in
substitutions are consistently escaped on all platforms before feeding
the substitutions to the regex engine. Make sure all substitutions
containing capture group references are wrapped in `SubstituteCaptures`
to suppress this behavior once main is rebranched.
2025-05-25 14:35:06 +01:00
finagolfin
35ee368bb9 [android][test] Fix or disable the remaining failing tests on the Android CI (#81398)
Also, fix and enable `IRGen/lto_autolink` for all non-Wasm targets and
`IRGen/static_initializer` for aarch64.


This should get [the community Android
CI](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-build/)
green
[again](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-arm64/).
2025-05-17 13:27:33 +05:30
Alexis Laferrière
9c7f0c7550 Merge pull request #80917 from xymus/cdecl-print
PrintAsClang: Print a C block in the compatibility header for `@cdecl` functions
2025-05-13 09:21:30 -07:00
Alastair Houghton
28f96e64ab [Concurrency][Stdlib] Add SwiftStdlibCurrentOS availability, use it.
If you use SwiftStdlibCurrentOS availability, you will be able to
use new types and functions from within the implementation. This
works by, when appropriate, building with the CurrentOS availability
set to the current deployment target.

rdar://150944675
2025-05-12 12:07:24 +01:00
Alexis Laferrière
0f98021708 PrintAsObjC Test: Don't use modules for C compatibility header tests 2025-05-06 16:18:49 -07:00
finagolfin
7d92dfe799 [test] Fix checking C and C++ headers for cross-compilation by explicitly adding the sysroot and target triple (#81312)
@weliveindetail noticed that these header checks when cross-compiling
are incorrectly checked against the host C and C++ headers and target,
so he added the cross-compilation sysroot for the C++ header check alone
more than a month ago in #79185. However, that broke several C++ Interop
tests when running the compiler validation suite for Android on both
[the Windows toolchain
CI](https://ci-external.swift.org/job/swift-main-windows-toolchain/) and
[the community Android CI on a linux
host](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-arm64/):
```
FAIL: Swift(android-x86_64) :: Interop/SwiftToCxx/class/nested-classes-in-cxx.swift (4495 of 18856)
******************** TEST 'Swift(android-x86_64) :: Interop/SwiftToCxx/class/nested-classes-in-cxx.swift' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
rm -rf "T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp" && mkdir -p "T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp"
# executed command: rm -rf 'T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp'
# executed command: mkdir -p 'T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp'
# RUN: at line 2
t:\5\bin\swift-frontend.exe -target x86_64-unknown-linux-android -sdk T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot -resource-dir T:/x86_64-unknown-linux-android28/Runtime/./lib/swift -module-cache-path T:\x86_64-unknown-linux-android28\Runtime\swift-test-results\x86_64-unknown-linux-android\clang-module-cache -swift-version 4  -define-availability 'SwiftStdlib 9999:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999' -define-availability 'SwiftStdlib 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2' -define-availability 'SwiftStdlib 5.1:macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0' -define-availability 'SwiftStdlib 5.2:macOS 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4' -define-availability 'SwiftStdlib 5.3:macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0' -define-availability 'SwiftStdlib 5.4:macOS 11.3, iOS 14.5, watchOS 7.4, tvOS 14.5' -define-availability 'SwiftStdlib 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0' -define-availability 'SwiftStdlib 5.6:macOS 12.3, iOS 15.4, watchOS 8.5, tvOS 15.4' -define-availability 'SwiftStdlib 5.7:macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0' -define-availability 'SwiftStdlib 5.8:macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4' -define-availability 'SwiftStdlib 5.9:macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0' -define-availability 'SwiftStdlib 5.10:macOS 14.4, iOS 17.4, watchOS 10.4, tvOS 17.4, visionOS 1.1' -define-availability 'SwiftStdlib 6.0:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -define-availability 'SwiftStdlib 6.1:macOS 15.4, iOS 18.4, watchOS 11.4, tvOS 18.4, visionOS 2.4' -define-availability 'SwiftStdlib 6.2:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999' -define-availability 'SwiftCompatibilitySpan 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, visionOS 1.1' -define-availability 'SwiftCompatibilitySpan 6.2:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -typo-correction-limit 10  C:\Users\swift-ci\jenkins\workspace\swift-main-windows-toolchain\swift\test\Interop\SwiftToCxx\class\nested-classes-in-cxx.swift -enable-library-evolution -typecheck -module-name Classes -clang-header-expose-decls=all-public -emit-clang-header-path T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h
# executed command: 't:\5\bin\swift-frontend.exe' -target x86_64-unknown-linux-android -sdk T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot -resource-dir T:/x86_64-unknown-linux-android28/Runtime/./lib/swift -module-cache-path 'T:\x86_64-unknown-linux-android28\Runtime\swift-test-results\x86_64-unknown-linux-android\clang-module-cache' -swift-version 4 -define-availability 'SwiftStdlib 9999:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999' -define-availability 'SwiftStdlib 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2' -define-availability 'SwiftStdlib 5.1:macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0' -define-availability 'SwiftStdlib 5.2:macOS 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4' -define-availability 'SwiftStdlib 5.3:macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0' -define-availability 'SwiftStdlib 5.4:macOS 11.3, iOS 14.5, watchOS 7.4, tvOS 14.5' -define-availability 'SwiftStdlib 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0' -define-availability 'SwiftStdlib 5.6:macOS 12.3, iOS 15.4, watchOS 8.5, tvOS 15.4' -define-availability 'SwiftStdlib 5.7:macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0' -define-availability 'SwiftStdlib 5.8:macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4' -define-availability 'SwiftStdlib 5.9:macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0' -define-availability 'SwiftStdlib 5.10:macOS 14.4, iOS 17.4, watchOS 10.4, tvOS 17.4, visionOS 1.1' -define-availability 'SwiftStdlib 6.0:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -define-availability 'SwiftStdlib 6.1:macOS 15.4, iOS 18.4, watchOS 11.4, tvOS 18.4, visionOS 2.4' -define-availability 'SwiftStdlib 6.2:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999' -define-availability 'SwiftCompatibilitySpan 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, visionOS 1.1' -define-availability 'SwiftCompatibilitySpan 6.2:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -typo-correction-limit 10 'C:\Users\swift-ci\jenkins\workspace\swift-main-windows-toolchain\swift\test\Interop\SwiftToCxx\class\nested-classes-in-cxx.swift' -enable-library-evolution -typecheck -module-name Classes -clang-header-expose-decls=all-public -emit-clang-header-path 'T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h'
# RUN: at line 3
't:\\5\\bin\\clang++.exe' -fmodules-cache-path='T:\\x86_64-unknown-linux-android28\\Runtime\\swift-test-results\\x86_64-unknown-linux-android\\clang-module-cache' -fsyntax-only -x c++-header -Weverything -Werror -Wno-unused-macros -Wno-incomplete-module -Wno-auto-import -Wno-variadic-macros -Wno-c++98-compat-pedantic -Wno-poison-system-directories -Wno-unused-command-line-argument -Wno-nullability-extension  --sysroot 'T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot' -F 'C:\\Users\\swift-ci\\jenkins\\workspace\\swift-main-windows-toolchain\\swift\\test\\Inputs\\clang-importer-sdk'/frameworks -I T:\x86_64-unknown-linux-android28\LLVM\include  -isysroot 'C:/Users/swift-ci/jenkins/workspace/swift-main-windows-toolchain/swift\\test'/Inputs/clang-importer-sdk -std=c++14 -Wno-padded -Wno-c11-extensions -D_LIBCPP_CSTDLIB -IT:/x86_64-unknown-linux-android28/Runtime/./lib/swift T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -std=c++17 && 't:\\5\\bin\\clang++.exe' -fmodules-cache-path='T:\\x86_64-unknown-linux-android28\\Runtime\\swift-test-results\\x86_64-unknown-linux-android\\clang-module-cache' -fsyntax-only -x c++-header -Weverything -Werror -Wno-unused-macros -Wno-incomplete-module -Wno-auto-import -Wno-variadic-macros -Wno-c++98-compat-pedantic -Wno-poison-system-directories -Wno-unused-command-line-argument -Wno-nullability-extension  --sysroot 'T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot' -F 'C:\\Users\\swift-ci\\jenkins\\workspace\\swift-main-windows-toolchain\\swift\\test\\Inputs\\clang-importer-sdk'/frameworks -I T:\x86_64-unknown-linux-android28\LLVM\include  -isysroot 'C:/Users/swift-ci/jenkins/workspace/swift-main-windows-toolchain/swift\\test'/Inputs/clang-importer-sdk -std=c++17 -Wno-padded -Wno-c11-extensions -D_LIBCPP_CSTDLIB -IT:/x86_64-unknown-linux-android28/Runtime/./lib/swift T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -std=c++17 && 't:\\5\\bin\\clang++.exe' -fmodules-cache-path='T:\\x86_64-unknown-linux-android28\\Runtime\\swift-test-results\\x86_64-unknown-linux-android\\clang-module-cache' -fsyntax-only -x c++-header -Weverything -Werror -Wno-unused-macros -Wno-incomplete-module -Wno-auto-import -Wno-variadic-macros -Wno-c++98-compat-pedantic -Wno-poison-system-directories -Wno-unused-command-line-argument -Wno-nullability-extension  --sysroot 'T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot' -F 'C:\\Users\\swift-ci\\jenkins\\workspace\\swift-main-windows-toolchain\\swift\\test\\Inputs\\clang-importer-sdk'/frameworks -I T:\x86_64-unknown-linux-android28\LLVM\include  -isysroot 'C:/Users/swift-ci/jenkins/workspace/swift-main-windows-toolchain/swift\\test'/Inputs/clang-importer-sdk -std=c++20 -Wno-padded -Wno-c11-extensions -D_LIBCPP_CSTDLIB -IT:/x86_64-unknown-linux-android28/Runtime/./lib/swift T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -std=c++17
# executed command: 't:\\5\\bin\\clang++.exe' '-fmodules-cache-path=T:\\x86_64-unknown-linux-android28\\Runtime\\swift-test-results\\x86_64-unknown-linux-android\\clang-module-cache' -fsyntax-only -x c++-header -Weverything -Werror -Wno-unused-macros -Wno-incomplete-module -Wno-auto-import -Wno-variadic-macros -Wno-c++98-compat-pedantic -Wno-poison-system-directories -Wno-unused-command-line-argument -Wno-nullability-extension --sysroot T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot -F 'C:\\Users\\swift-ci\\jenkins\\workspace\\swift-main-windows-toolchain\\swift\\test\\Inputs\\clang-importer-sdk/frameworks' -I 'T:\x86_64-unknown-linux-android28\LLVM\include' -isysroot 'C:/Users/swift-ci/jenkins/workspace/swift-main-windows-toolchain/swift\\test/Inputs/clang-importer-sdk' -std=c++14 -Wno-padded -Wno-c11-extensions -D_LIBCPP_CSTDLIB -IT:/x86_64-unknown-linux-android28/Runtime/./lib/swift 'T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h' -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -std=c++17
# .---command stderr------------
# | T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h:29:10: fatal error: 'cstdint' file not found
# |    29 | #include <cstdint>
# |       |          ^~~~~~~~~
# | 1 error generated.
# `-----------------------------
# error: command failed with exit status: 1
```
I experimented a bit and found that explicitly passing in the target
triple fixed these tests, so this pull does that for C++ and also
corrects the C header check.
2025-05-06 13:54:26 +05:30
Slava Pestov
89aabcb688 Add temporary 'SwiftCompatibilitySpan 6.2' availability macro 2025-04-07 21:32:48 -04:00
Stefan Gränitz
d6ac1eca74 [windows][toolchain] Run non-executable Swift Runtime tests for Android (#79185)
We cross-compile the Swift runtime libs for the Android SDKs in the Windows toolchain. This patch adds a build step that runs non-executable tests for them.
2025-03-16 22:52:38 +01:00
Mike Ash
3ef4db6b3a Merge pull request #79613 from mikeash/reflection-tests-no-chained-fixups
[Test] Disable chained fixups when building a few reflection tests.
2025-02-26 10:26:26 -05:00
Mike Ash
10feb11d27 [Test] Disable chained fixups when building a few reflection tests.
ObjectFileContext doesn't currently support chained fixups. For now, avoid building the test binaries with chained fixups to avoid issues.

This adds a %no-fixup-chains substitution which resolves to -Xlinker -no_fixup_chains on Darwin, and to nothing on everything else.

rdar://145442500
2025-02-25 13:54:42 -05:00
Alastair Houghton
0bc76dae80 [Backtracing] Add warning suppression option, enable it for tests.
The backtracing code will warn you if you attempt to forcibly enable
backtracing for a privileged executable.  This is apparently upsetting
the Driver/filelists.swift test.

Since we want to force it on for tests, so that we will definitely get
backtraces, add an option to suppress warning messages, and turn that
on for tests as well.

rdar://144497613
2025-02-24 12:55:16 +00:00
finagolfin
fef79857a9 [test] Remove now unused variables in the lit.cfg for the Android emulator (#79263) 2025-02-11 01:15:13 +05:30
Ian Anderson
517ced4f4b [ClangImporter][Tests] clang doesn't support the empty string as a path argument
SIL/verify_all_overlays.py is passing `-F ""` on non-Apple platforms. Swift handles that kind of, but clang doesn't support it and will get argument parsing errors. It's a pathological case, so fix SIL/verify_all_overlays.py to not do that, but also add a failsafe in ClangImporter to not pass on empty paths.

rdar://142441042
2025-02-03 13:06:32 -08:00