Commit Graph

98 Commits

Author SHA1 Message Date
Alastair Houghton
71abe6f26b [Tests] Disable backtracing in some tests.
These tests can be negatively affected by the warnings about unsupported
Swift backtracer settings.

rdar://144497613
2025-02-25 10:53:28 +00:00
Hamish Knight
d260bd8ddb [build-script] Remove Xcode generation support
This was quite brittle and has now been superseded
by swift-xcodegen. Remove the CMake/build-script
logic for it, leaving the option behind to inform
users to switch to using xcodegen instead.
2025-02-12 12:19:21 +00:00
Eric Miotto
5d304fb803 Ensure build_worktree.test runs on Apple Silicon.
It looks like in this configuration we need to convince `build-script`
we have `ninja` sources in the worktree.

Resolves #79256
Addresses rdar://144503319
2025-02-10 10:10:06 -08:00
Mishal Shah
46bd549621 Fix the REQUIRES in validation-test/BuildSystem/build_worktree.test 2025-02-09 20:45:30 -08:00
Mishal Shah
1f48b2ca8f [Disabled] 1 BuildSystem test to support new version of Xcode 16.2 and macOS 15.2 https://github.com/swiftlang/swift/issues/79256 2025-02-09 20:03:58 -08:00
Anthony Latsis
4a5e0daa9d build: Unhardcode Swift source directory name
This is useful if you maintain several swift worktrees that reside in
the source root directory.
2025-01-07 09:58:47 +00:00
Hamish Knight
abec83f68e [test] Quote %original_path_env in swift-xcodegen.test
Ensure we can handle a PATH with spaces.
2024-11-16 22:28:13 +00:00
Hamish Knight
43be5456b1 [xcodegen] Allow output to be missing in compile_commands.json
This may not always be present for CI builds.
2024-11-06 12:20:44 +00:00
Hamish Knight
03d8ea5248 Introduce swift-xcodegen
This is a tool specifically designed to generate
Xcode projects for the Swift repo (as well as a
couple of adjacent repos such as LLVM and Clang).
It aims to provide a much more user-friendly experience
than the CMake Xcode generation (`build-script --xcode`).
2024-11-05 22:42:10 +00:00
Ben Barham
df81d0a450 [Tests] XFAIL the remaining test failures on rebranch
Only a few tests remaining. XFAIL so we can test the rest of the
toolchain.
2024-08-08 14:47:18 -07:00
Artem Chikin
1f14158a1d Introduce VisionOS Platform
This change introduces a new compilation target platform to the Swift compiler - visionOS.

- Changes to the compiler build infrastrucuture to support building compiler-adjacent artifacts and test suites for the new target.
- Addition of the new platform kind definition.
- Support for the new platform in language constructs such as compile-time availability annotations or runtime OS version queries.
- Utilities to read out Darwin platform SDK info containing platform mapping data.
- Utilities to support re-mapping availability annotations from iOS to visionOS (e.g. 'updateIntroducedPlatformForFallback', 'updateDeprecatedPlatformForFallback', 'updateObsoletedPlatformForFallback').
- Additional tests exercising platform-specific availability handling and availability re-mapping fallback code-path.
- Changes to existing test suite to accomodate the new platform.
2024-04-10 09:38:02 -07:00
Eric Miotto
efdd4954d3 build-script: add flag to pass arguments to dsymutil
This is currently needed to disable DWARF verification in
some Apple internal configurations.

Addresses rdar://125092216
2024-03-22 08:04:31 -07:00
Kuba Mracek
0f2cbbf955 Adjust expectations on xargs parameters in validation-test/BuildSystem/dsymutil_jobs.test 2024-02-29 13:53:56 -08:00
Eric Miotto
2072bf8d3f CMake: run generate_xcode.txt only for the host platform (#71279)
Currently the test assumes that when we are testing for macOS we are
targeting the host architecture (since we need to reuse existing build
products to contain testing time) -- however there are some Apple
internal configurations in which that's not the case.

Addresses rdar://118337598
2024-02-05 16:15:46 -08:00
Artem Chikin
73b01dccfc Remove incremental builds from the Legacy driver
The C++-based driver is deprecated and this will help reduce the code surface that requires maintenance as the legacy driver is fully sunset.
2024-01-16 16:34:51 -08:00
Finagolfin
a03f6e5b3a [Build] Enable building and CI testing the early Swift Driver on linux with the prebuilt host toolchain 2023-11-08 20:09:59 +05:30
Anthony Latsis
2644adf2b0 [NFC] Delete redundant RUN line in test 2023-09-26 16:32:29 +03:00
Anthony Latsis
5e50aa5d08 [NFC] Add lit test for Xcode project generation 2023-09-26 16:32:27 +03:00
Anthony Latsis
17fc2d200e build-script: Don't emit build commands for LLVM when --build-llvm set to false 2023-09-23 14:10:05 +03:00
Ben Barham
8fbdae12fc [Build] Skip early-* on non-darwin hosts
These builds do not work outside of darwin currently. Rather than adding
the skip to all the necessary build presets, just disable in the product
instead.
2023-08-23 11:43:35 -07:00
Eric Miotto
266c00d285 Skip build system tests when targeting remote executors
These will be still exercised when targeting macOS, Linux and Windows.

Addresses rdar://111854328
2023-07-06 09:50:02 -07:00
Eric Miotto
1aaaef91cc Relax FileCheck directives for skip_clean_llbuild.test (#66062)
This is needed short term to allow the test to pass when running on
Python 3.11 and later and avoid errors like

```
<stdin>:44:1: note: non-matching line after previous match is here
<string>:1: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
^
```

Long term we want to replace uses of the obsolete `pipes.quotes`
function with `shlex.quotes`.

Addresses rdar://109664710
2023-05-24 08:18:10 -07:00
Anthony Latsis
f94f401a06 build-script: Don't build LLVM testing tools when generating Xcode projects 2023-03-16 20:58:14 +03:00
Dario Rexin
2bac2a1cbf Update skip_build_xcode.test 2022-12-08 09:41:33 -08:00
Anthony Latsis
c50d2214cb build: Mirror LLVM+Xcode-specific build-script-impl logic in CMake build-script product
This fixes the behavior of `--xcode`, which was relying on this logic and was
compromised when LLVM became a build-script product.
2022-11-22 19:44:14 +03:00
Dario Rexin
3f80cb6712 [Build] Make LLVM a build-script product
rdar://80733826
2022-10-30 22:47:29 -07:00
Eric Miotto
f7a11c7543 Tests all cases of infer-cross-compile-hosts-on-darwin at once (#60824)
The current implementation currently requires to have physical machine
for each architecture supported by macOS, which is not desirable.

To allow all cases to be tested on a random Mac machine, allow
to inject an arbitratry current architecture into the inference
of the cross compile hosts by means of an environment variable.

Addresses rdar://99096874
2022-08-30 00:10:40 -07:00
Eric Miotto
c954130be0 Add a flag to infer appropriate cross compile hosts on Darwin
Addresses rdar://98787335, apple#60348
2022-08-22 09:37:52 -07:00
Alex Hoppen
55051a71b2 [test] Explicitly specify --cmake %cmake for build_lld.test
I believe this was causing CMake to get built for the test case and make the test case take ~5min on Linux instead of ~15sec.
2022-06-08 18:36:19 +02:00
Josh Soref
0f78f006bb Spelling validation test (#58561) 2022-05-27 22:07:10 -07:00
Alex Hoppen
e313df88ce [build-script] Add option to build lld as part of LLVM 2022-04-12 16:38:34 +02:00
Butta
a3ea28ff19 [android] Remove ICU build flags since that requirement was dropped in #40340 2021-12-20 12:06:13 +05:30
Erik Eckstein
6199876be7 cmake: remove support for non-libswift swift support in host libraries/executables.
This is not needed anymore because all swift code will be contained in libswift.
Also, remove the corresponding tests.
2021-12-05 19:06:00 +01:00
Michael Gottesman
7f273a1d48 Merge pull request #39129 from gottesmm/pr-ce6749f7a3c9f7189d38038a4f6210a168c2d0e0
[build-script] Add an option for cleaning the install destdir
2021-09-02 15:04:05 -07:00
Michael Gottesman
8794dd1003 [build-script] Add an option for cleaning the install destdir
Useful to make sure that one is not hitting weird behavior due to a stale just
built toolchain.
2021-09-02 12:25:40 -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
Michael Gottesman
1d86a22f5b [build-script] Add a SKIP_XCODE_VERSION_CHECK to all dry-run build-script tests.
It makes sense to just set this here since we aren't testing that functionality
and enables us to test this if we aren't using one of the specified Xcodes
(which can be useful).
2021-08-31 14:10:28 -07:00
Butta
cec3e11207 [build][test] Don't test '--skip-clean-xctest' on Darwin as the source may not be checked out 2021-08-31 21:06:10 +05:30
swift-ci
0c122a514f Merge pull request #38673 from buttaface/skip-clean 2021-08-30 16:27:14 -07:00
David Zarzycki
20f9be1f9a [testing] Add missing REQUIRES: standalone_build 2021-08-28 12:11:01 -04:00
Michael Gottesman
4f149d07ce [build-script] Split the build-script-impl pipeline into two pipelines so I can put a build-script product pipeline in between.
This is where I am going to put the stage 2 swift. The reason why I need to do
this is that I need libdispatch, foundation, etc on Linux to use the stage2
compiler.
2021-08-26 16:48:25 -07:00
Michael Gottesman
15aff43980 Revert "Revert "[build-script] Use a builder to setup pass pipelines that are then scheduled when using --infer""
This reverts commit 7348395a30.
2021-08-25 19:31:29 -07:00
Mishal Shah
7348395a30 Revert "[build-script] Use a builder to setup pass pipelines that are then scheduled when using --infer" 2021-08-18 08:34:18 -07:00
Michael Gottesman
6d50463656 [build-script] Use a builder to setup pass pipelines that are then scheduled when using --infer
The key thing here is that by using this builder, I am going to be able to split
the build-script-impl pipeline in two and put in a build-script pipeline in
between. This is needed so that on Linux, we can build the stage 2 compiler
before we build any of the build-script-impl libraries that depend on having a
swift compiler.

This should be an NFCI change. I am relying on our build system unit tests to
ensure that I am not changing any real behavior.
2021-08-17 19:54:03 -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
Eric Miotto
2c6d762d19 Use existing CMake in some build-script tests (#38842)
This will prevent the tests to rebuild CMake (especially under Linux)
and cause transient issues.

This is similar to what was done for #37611
2021-08-12 07:12:47 -07:00
Mishal Shah
0ebceda18b Mark android_cross_compile.test unsupported for iOS, tvOS, and watchOS 2021-07-06 15:25:39 -07:00
Butta
de148ada38 [build] disable failing Android cross-compilation test on macOS 2021-07-01 03:17:05 +05:30
Varun Gandhi
a07b4761b3 Merge pull request #33724 from buttaface/core
[build] Add the flags to enable cross-compiling the corelibs
2021-06-30 09:31:51 -07:00
Michael Gottesman
d829de1e25 [build-script] Use a toolchain file and always cross compile cmark.
NOTE: We still build for the host platform always, but even in that case within
cmark itself, we are cross compiling it.
2021-06-28 19:26:10 -07:00