Commit Graph

8541 Commits

Author SHA1 Message Date
Saleem Abdulrasool
eb1ea4e329 Merge pull request #78950 from compnerd/mimalloc
update_checkout: add mimalloc
2025-01-28 10:47:47 -08:00
Rintaro Ishizaki
8d2ac00015 [XcodeGen] Handle 'rule' declarations and generate command line args
* Rename 'BuildRule to 'BuildEdige' because it is the official term
* NinjaParser to handle 'include' and 'rule' directives
* NinjaParser to handle parse "rule name" in 'build' correctly
* Make variable table a simple `[String: String]` and keep any bindings
  to make the substitutions possible.
* Generate command line argumets using 'command' variable in the 'rule'
  and use it as the source of truth, istead of using random known
  bindings like 'FLAGS'.
2025-01-28 10:07:17 -08:00
Stefan Gränitz
7c821ed098 [windows] Enable tests for LLDB in Swift CI (#78844)
TL;DR Please revert this patch in case LLDB testing on Windows clogs Swift PR-tests

The LLDB test suite is not very stable on Windows, which is a problem when we want to run them in CI. In order to improve the situation, however, we need to get it tested continuously. This patch attempts to solve the chicken-egg problem. It introduces a simple override for unstable tests: list them in file `utils/windows-llvm-lit-test-overrides.txt` and SwiftCI will skip/xfail them.

This approach has a number of benefits:
* overrides don't need to be in sync with https://github.com/swiftlang/llvm-project
* overrides are tracked in one place and they are not spread across the LLDB test suite
* overrides are swiftlang-specific, which clearly states the differences to upstream LLVM
* we can enable continuous testing (and get reports for new failures) without fixing the world first

Once the remaining subset of tests passes reliably, we can iterate to enable the others and increase coverage. My previous patch 459e59265d implemented the necessary infrastructure. This one only enable tests in CI. The separation allows to disable LLDB testing on Windows with fewer side-effects.
2025-01-28 05:08:49 -08:00
Alastair Houghton
ab8e561583 Merge pull request #78516 from al45tair/eng/PR-124913332
[Backtracing] Implement API per SE-0419
2025-01-28 10:48:33 +00:00
Stefan Gränitz
459e59265d [windows] Prepare toolchain build to run tests for LLDB (#76894)
The LLDB test suite is not very stable on Windows. In order to improve the situation, however, we need to get it tested continuously. This patch attempts to solve the chicken-egg problem. It introduces a simple override for unstable tests: list them in file `utils/windows-llvm-lit-test-overrides.txt` and SwiftCI will skip/xfail them.

This approach has a number of benefits:
* overrides don't need to be in sync with https://github.com/swiftlang/llvm-project
* overrides are tracked in one place and are not spread across the LLDB test suite
* overrides are swiftlang-specific, which clearly states the differences to upstream LLVM
* we can enable continuous testing (and get reports for new failures) without fixing the world first

Once the remaining subset of tests passes reliably, we can iterate to enable the others and increase coverage. This change implements the infrastructure. There is a separate PR to enable tests in CI, which can be reverted with fewer side-effects.
2025-01-27 17:59:22 -08:00
Saleem Abdulrasool
35da98d1dc utils: remove icu checkout on rebranch
The ICU repository is no longer used, supplanted by
swift-foundation-icu. Remove the unnecessary clone to save some time.
2025-01-27 14:25:33 -08:00
Saleem Abdulrasool
5543a2d845 utils: remove some repositories from the default checkout
Only code xcode-playground-support on Darwin, mimalloc on Windows.
2025-01-27 14:25:24 -08:00
Max Desiatov
8dc4c56db7 Merge pull request #78909 from xtremekforever/#75341-fix-swift-build-support-typo
Fix typo in get_linux_sysroot that makes cross-compilation fail
2025-01-27 20:20:01 +00:00
Saleem Abdulrasool
b73b90fc6c Merge pull request #78931 from compnerd/gnuwin32
utils: introduce the ability to use the GNU driver on Windows
2025-01-27 11:11:56 -08:00
Saleem Abdulrasool
db80c7a984 update_checkout: add mimalloc
Add mimalloc to the checkout set. This is to allow us to build the
project for the Windows toolchain.
2025-01-27 10:55:39 -08:00
Saleem Abdulrasool
0944fa486b Merge pull request #78933 from compnerd/cleanliness-and-order
utils: adjust the `-Clean` option to clean before execution
2025-01-27 08:43:48 -08:00
Jesse L. Zamora
57dc1d1578 Fix linting issues in test_llvm_linux_cross_compile.py 2025-01-27 08:26:38 -05:00
eeckstein
95f1dfbf07 Merge pull request #78885 from eeckstein/fix-without-actually-escaping
Fix two problems with `withoutActuallyEscaping`
2025-01-27 07:59:02 +01:00
Saleem Abdulrasool
3d2da989a2 Merge pull request #78929 from compnerd/merging
utils: remove duplication from a bad merge
2025-01-26 18:20:42 -08:00
Saleem Abdulrasool
22d97b5256 utils: introduce the ability to use the GNU driver on Windows
Add support to `Build-CMakeProject` to use the GNU driver on Windows.
This is preparatory work to get the experimental runtime build working
(and subsequently enable a static SDK for Windows). It also opens the
possibility to explore the performance gap between MSVC and clang.
2025-01-26 18:19:15 -08:00
Saleem Abdulrasool
877c53a0e5 utils: adjust the -Clean option to clean before execution
This hoists the cleaning to prior to building the toolchain. This is
particularly important as changes in the module format may cause the
compiler to crash. Due to the use of Swift in the Swift compiler, we
load modules early and a previous run may have left over modules from
the last run, which would result in the module attempting to be loaded.
This cleans out the extra modules before the toolchain build avoiding
that.
2025-01-26 13:27:57 -08:00
Saleem Abdulrasool
44a055773b utils: remove duplication from a bad merge
We were computing the SDKROOT multiply with the same logic twice which
is unneeded. Clean this up to compute it once.
2025-01-26 12:45:25 -08:00
Evan Wilde
2a76cc13f6 Merge pull request #78921 from etcwilde/ewilde/reenable-new-stdlib-build
Enable new stdlib build in macOS smoke tests
2025-01-25 21:34:17 -08:00
Evan Wilde
2f639fc2ed Enable new stdlib build in macOS smoke tests
This patch enables the new runtime build in macOS smoke testing in CI.
This is only ensuring that the default configuration builds and does not
enable anything fancy at this time.
2025-01-25 17:30:30 -08:00
Saleem Abdulrasool
89f9c5f92f Merge pull request #78826 from compnerd/sweet-potato-fries
utils: remove Yams from the checkout set
2025-01-25 17:18:15 -08:00
Jesse L. Zamora
7205e44795 Merge remote-tracking branch 'origin/main' into #75341-fix-swift-build-support-typo 2025-01-25 17:38:15 -05:00
Jesse L. Zamora
454add736a Add test for testing get_linux_sysroot when cross-compiling LLVM 2025-01-25 15:11:42 -05:00
Saleem Abdulrasool
347231241e Merge pull request #78862 from compnerd/sdksettings
utils: start generating a SDKSettings.json on Windows
2025-01-25 08:08:13 -08:00
Alex Hoppen
906764a205 [Windows] Adjustments to build.ps1 for restructuring of indexstore-db 2025-01-24 23:09:13 -08:00
Jesse L. Zamora
514acac478 Fix typo in get_linux_sysroot that makes cross-compilation fail 2025-01-24 23:52:36 -05:00
Erik Eckstein
3ec5d7de24 SIL: replace the is_escaping_closure instruction with destroy_not_escaped_closure
The problem with `is_escaping_closure` was that it didn't consume its operand and therefore reference count checks were unreliable.
For example, copy-propagation could break it.
As this instruction was always used together with an immediately following `destroy_value` of the closure, it makes sense to combine both into a `destroy_not_escaped_closure`.
It
1. checks the reference count and returns true if it is 1
2. consumes and destroys the operand
2025-01-24 19:23:27 +01:00
Evan Wilde
e4887c7193 Disable the new stdlib build (#78878)
Somehow the new build system is affecting the old build system in such a
way that it's not producing the Swift Concurrency runtime for smoke
testing, resulting in test failures due to the missing library.

```
/Users/ec2-user/jenkins/workspace/swift-PR-macos-smoke-test/branch-main/build/buildbot_incremental/llvm-macosx-x86_64/bin/llvm-nm: error: /Users/ec2-user/jenkins/workspace/swift-PR-macos-smoke-test/branch-main/build/buildbot_incremental/swift-macosx-x86_64/lib/swift/macosx/x86_64/libswift_Concurrency.dylib: No such file or directory
```

This isn't even a directory that is affected by the new build, but
disabling to try to bring things back up.
2025-01-24 10:21:42 -08:00
Saleem Abdulrasool
33eab01cfb Merge pull request #78859 from compnerd/cleaning
utils: update build.ps1 to improve the `-Clean` option
2025-01-24 09:06:56 -08:00
Michael Gottesman
d060f01527 Merge pull request #78837 from gottesmm/rdar-142661388
[rbi] Change Region Based Isolation for closures to not use the AST and instead just use SIL.
2025-01-23 15:48:34 -08:00
Saleem Abdulrasool
b1fba460f9 Merge pull request #78831 from compnerd/pure
utils: disable C compiler for ASN1
2025-01-23 12:51:02 -08:00
Evan Wilde
74d4917851 Merge pull request #78477 from etcwilde/ewilde/macos-smoketest-enable-new-build
Enable new stdlib build in macOS smoke tests
2025-01-23 12:48:22 -08:00
Stefan Gränitz
7bbd5d73a1 utils: re-enable testing for libdispatch in build.ps1 (#78685) 2025-01-23 12:13:05 -08:00
Saleem Abdulrasool
ce4ad6f0db utils: start generating a SDKSettings.json on Windows
When building SDKs, generate a SDKSettings.json file to silence a
spurious warning from swift-driver.
2025-01-23 11:21:35 -08:00
Saleem Abdulrasool
ef0e596722 utils: update build.ps1 to improve the -Clean option
Clear out the android builds as well as any leftovers from a previous
test run which would possibly break the build in the case that the
compiler was updated.
2025-01-23 10:30:43 -08:00
Michael Gottesman
6058b1d9bd [silgen] Change SILGen to emit ignored_user for emitIgnoredExpr and black hole initialization. 2025-01-22 21:12:36 -08:00
Saleem Abdulrasool
cbae09a727 utils: disable C compiler for ASN1
The ASN1 project does not have C code so passing the C compiler causes
some warnings.
2025-01-22 16:48:40 -08:00
Saleem Abdulrasool
0f1bea868a utils: convert System to static
Build System as static as it has been internalised into SPM and no
longer needs to be shared across multiple targets. This reduces the
number of distributed files and helps reduce the binary size (~56KiB).
2025-01-22 15:30:01 -08:00
Saleem Abdulrasool
6793914870 utils: remove Yams from the checkout set
The Yams dependency has been removed, remove it from the checkout set.
This should have a minimal speed up on the checkout stage in CI.
2025-01-22 14:10:17 -08:00
Saleem Abdulrasool
e5d36eaa68 utils: stop building Yams as the only consumer no longer uses it
This cleans up the build to remove Yams which will save some time in the
build. It also simplifies the build a bit.
2025-01-22 09:15:38 -08:00
Marc Prud'hommeaux
d092105e66 Make swift-testing installable with --install-swift-testing rather than --install-swift-testing-macros (#76840) 2025-01-22 18:32:39 +05:30
Alastair Houghton
ca233af1ea [Backtracing] Fix Python test failure.
We needed to add `--enable-runtime-module` in the Python test scripts.

rdar://124913332
2025-01-21 19:02:47 +00:00
Alejandro Alonso
11fbd94668 Merge pull request #78664 from Azoy/unicode-16
[stdlib] Unicode 16
2025-01-21 09:29:35 -08:00
Saleem Abdulrasool
7a8cc95734 utils: convert SystemPackage to static linkage
SwiftSystem is only used in a single location in SPM, allowing us to
collapse the file into the single site. This reduces the overall
toolchain size by ~56K. It also removes the need to ship the extra DLL.
2025-01-17 13:59:55 -08:00
Alastair Houghton
c7bb91d8fe [Backtracing] Tweak tests slightly.
`JSONEncoder` by default will escape slashes, which results in a string
that isn't technically valid Base64.  Since that behaviour is optional,
turn it off, and at the same time tell it to output in lexical key
order, which makes the test slightly simpler (no `CHECK-DAG` needed).

Also fixed a typo in `test_swift.py`

rdar://124913332
2025-01-17 10:09:37 +00:00
Alastair Houghton
760cc57bef [Backtracing] Rename _Backtracing to Runtime.
Move the backtracing code into a new Runtime module.  This means renaming
the Swift Runtime's CMake target because otherwise there will be a name
clash.

rdar://124913332
2025-01-17 10:09:36 +00:00
Alejandro Alonso
708d72d2c3 Update tests for 6.1 Unicode 16 stdlib 2025-01-15 14:09:57 -08:00
Alex Hoppen
e2235e201c Merge pull request #78421 from ahoppen/add-sourcekit-plugin
[SourceKit] Add mechanism to load plugins for request handling into SourceKit
2025-01-15 12:42:10 -08:00
Saleem Abdulrasool
ca7e736a58 Merge pull request #78596 from compnerd/info
utils: introduce a `ToolchainInfo.plist` on Windows
2025-01-15 08:51:41 -08:00
Yuta Saito
c68db65453 Merge pull request #78341 from kateinoigakukun/katei/add-sourcekit-lsp-verify
CI: Add `--sourcekit-lsp-verify-generated-files` build-script option
2025-01-16 01:09:43 +09:00
Alejandro Alonso
b49466de06 Update Unicode generators to support 16 2025-01-14 14:16:29 -08:00