Commit Graph

8541 Commits

Author SHA1 Message Date
swift-ci
86cab09f9a Merge remote-tracking branch 'origin/main' into rebranch 2024-05-21 20:54:13 -07:00
Andrew Trick
2640ff613b Revert "Fix quadratic performance of the ListMerger in specific usage pattern" 2024-05-21 16:23:57 -07:00
swift-ci
969e44871a Merge remote-tracking branch 'origin/main' into rebranch 2024-05-21 14:14:55 -07:00
Andrew Trick
446ff7bca0 Merge pull request #73798 from etcwilde/ewilde/linker-whack-a-mole
Mark more linux linkers
2024-05-21 14:11:23 -07:00
Evan Wilde
826255254e Mark more linux linkers
This patch fixes more build presets. Anything that builds a clang-linker
needs to set the linker to use gold. bfd won't work!
2024-05-21 14:03:20 -07:00
swift-ci
e844c612c2 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-21 09:35:21 -07:00
Andrew Trick
deb3b23fe0 Merge pull request #73785 from etcwilde/ewilde/set-smoketest-linker
Set the linker to gold for smoketests
2024-05-21 09:30:09 -07:00
Evan Wilde
7596d00916 Set the linker to gold for smoketests
I missed setting the default linker used by the clang-linker to `gold`
in smoketests, so they're seeing the broken link jobs now.
2024-05-21 06:39:37 -07:00
swift-ci
4674bfe9b2 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-20 17:14:35 -07:00
Mishal Shah
d87c991190 Merge pull request #73758 from etcwilde/ewilde/update-swift-driver-checkout
Update swift-driver checkout
2024-05-20 17:02:45 -07:00
swift-ci
442d48a4a1 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-20 14:36:59 -07:00
John McCall
e1a82f622e Merge pull request #70910 from nickolas-pohilets/mpokhylets/fix-list-merger-performance
Fix quadratic performance of the `ListMerger` in specific usage pattern
2024-05-20 17:26:34 -04:00
Evan Wilde
d8230b48ef Update swift-driver checkout
`update-checkout` should be checking out the release/6.0 driver for
Swift-6.0 builds instead of the main branch driver.
2024-05-20 13:09:05 -07:00
swift-ci
19b1642a3f Merge remote-tracking branch 'origin/main' into rebranch 2024-05-20 11:38:00 -07:00
Yuta Saito
7ce4df7816 Merge pull request #73746 from kateinoigakukun/yt/repair-wasm-ci-20240519 2024-05-21 03:27:53 +09:00
swift-ci
24e9740242 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-20 09:54:08 -07:00
Yuta Saito
0f50aca4e9 [test] Move embedded wasm tests to a separate directory
The `classes-wasm.swift` test was the only executable test for
WebAssembly that requires wasm runtime at test-time. Other tests
in the `embedded` directory run only on the macOS / Linux host toolchain
builds and some of them are incompatible with SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB=OFF.
Given that the `classes-wasm.swift` test is the only test we want to run
during WasmStdlib build, move it to a separate directory `embedded/wasm`.
2024-05-20 11:55:10 +00:00
Yuta Saito
a06dc0e12e [wasm] Repair build for recent SwiftDriver linkage changes
- Before f34d388bf2, the EarlySwiftDriver used Dispatch/Foundation from
old host toolchain at the initial "build" step, and then re-linked the just
built Dispatch/Foundation at "install" step.
- WasmStdlib product incorrectly set `BOOTSTRAPPING_MODE` to `HOSTTOOLS`
and it makes `SwiftSource.cmake` set `LD_LIBRARY_PATH` to load the
Dispatch/Foundation from the just built toolchain (SWIFT_NATIVE_SWIFT_TOOLS_PATH).

After f34d388bf2, the EarlySwiftDriver always uses the corelibs of
the old host toolchain, so setting `LD_LIBRARY_PATH` leads to loading
incompatible corelibs of the old host toolchain, and the build fails.

This change tells the CMake build system to use CROSSCOMPILE mode.
We already built the toolchain for the current host from the revision
being built for the target, so we don't need to inject the lib library
of the old host toolchain.
2024-05-20 06:29:45 +00:00
Saleem Abdulrasool
eb6cd285da Update utils/build.ps1
Co-authored-by: Mishal Shah <shahmishal@users.noreply.github.com>
2024-05-18 12:30:31 -07:00
Saleem Abdulrasool
5440760612 utils: tweak the path before using a Swift toolchain
We need to tweak the path before we can use the pinned or the just built
toolchain. This becomes a problem when trying to cross-compile the
toolchain.
2024-05-18 09:30:55 -07:00
Evan Wilde
d63152fd80 Set toolchain clang linker to gold
BFD doesn't work with Swift symbols. We get nasty errors like this:

```
error: link command failed with exit code 1 (use -v to see invocation)
/usr/bin/ld: ...wift/CMakeFiles/swiftDispatch.dir/Block.swift.o:
  relocation R_X86_64_PC32 against protected symbol
  `$s8Dispatch0A13WorkItemFlagsVSYAAMc' can not be used when making a
  shared object
/usr/bin/ld: final link failed: bad value
```
2024-05-15 13:11:07 -07:00
Evan Wilde
b35aecb6d5 Use consistent clang through build
The just-built Swift driver was picking up the system clang, which would
try to use the bfd linker instead of gold or lld. bfd doesn't like how
Swift handles protected symbols and fails with the following error:

```
error: link command failed with exit code 1 (use -v to see invocation)
/usr/bin/ld: /home/build-user/build/buildbot_linux/libdispatch-linux-x86_64/src/swift/CMakeFiles/swiftDispatch.dir/Block.swift.o: relocation R_X86_64_PC32 against protected symbol `$s8Dispatch0A13WorkItemFlagsVSYAAMc' can not be used when making a shared object
/usr/bin/ld: final link failed: bad value
```

This patch tells the Swift-Driver where it should find its clang, and
makes it match the clang that is in use through the rest of the build.
2024-05-15 13:11:06 -07:00
swift-ci
38df85afd6 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-15 08:16:25 -07:00
Eric Miotto
5977d31c73 Merge pull request #73603 from edymtt/edymtt/swift-args-for-debug-info-non-lto
[CMake] allow custom options when building the compiler with debug info
2024-05-15 08:07:41 -07:00
Alex Lorenz
9db8d92523 review fixes 2024-05-14 12:37:57 -07:00
Alex Lorenz
5905dc9ef3 more cross-arch build.ps1 android fixes 2024-05-14 12:15:06 -07:00
Eric Miotto
ce0e620d1a [CMake] allow custom options when building the compiler with debug info
Currently those are hardcoded to `-g`, but in some Apple internal
configurations we would like to change them.

There are other part of the build system that hardcode `-g`
(e.g. in `SwiftCompilerSources` and `AddSwiftStdlib.cmake`),
but we are not interested in those at the moment -- we will address those
in the future if need be.

Supports rdar://127503136
2024-05-14 08:42:35 -07:00
swift-ci
334ad2cef7 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-13 08:13:44 -07:00
Alexander Smarus
4222205f17 utils: do not install testable corelibs builds 2024-05-13 01:53:08 +03:00
Mykola Pokhylets
9ba09ff63d Process incoming queue when obtaining drainer lock 2024-05-10 11:05:22 +02:00
Mykola Pokhylets
40c38f9803 Using multiple insertion points to ensure all jobs are always inserted in O(1)
Fully separated unprocessed jobs and processed jobs
Reverse jobs after updating status to minimise contention
2024-05-10 11:05:22 +02:00
Mykola Pokhylets
21a70e10c7 Fixed quadratic performance of ListMerger when each executed job creates 2+ new jobs of the same priority
See https://forums.swift.org/t/quadratic-performance-of-the-listmerger-in-specific-use-case/69393
2024-05-10 11:05:22 +02:00
swift-ci
f0328e2fd5 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-09 21:33:46 -07:00
Kuba Mracek
ab5425fc1f Update test expectations around --skip-build-lld 2024-05-09 15:46:48 -07:00
Kuba Mracek
921c0e530e Simplify lld selection logic in build_script_invocation.py 2024-05-09 09:40:33 -07:00
Kuba Mracek
30a5986a21 [lld] Allow opt-out from building lld via --skip-build-lld 2024-05-09 09:18:51 -07:00
swift-ci
e462ffffd8 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-08 23:53:54 -07:00
Mishal Shah
6998ebd9ed Bump the Yams version to 5.0.6 to support Windows arm64 2024-05-08 15:50:18 -07:00
swift-ci
abddb0b553 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-08 14:14:00 -07:00
Saleem Abdulrasool
421c0cf890 utils: use cmark gfm for the build when running the compiler
When using the just built compiler, we need to use the build CMark
runtime as it is executing on the build. This used to work when host and
build were guaranteed to be identical (i.e. no cross-compilation). This
is now needed to support cross-compiling ARM64.
2024-05-07 14:47:01 -07:00
swift-ci
c30af15f40 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-06 23:14:44 -07:00
eeckstein
ade04a7945 Merge pull request #73417 from eeckstein/force-bootstrapping
Force enabling SwiftCompilerSources in the build
2024-05-07 07:55:23 +02:00
swift-ci
082c552a2f Merge remote-tracking branch 'origin/main' into rebranch 2024-05-06 09:55:11 -07:00
Alastair Houghton
9e2c13bd10 Merge pull request #71839 from al45tair/eng/PR-123503470
[Build] Add the new fully-static Linux SDK.
2024-05-06 17:34:22 +01:00
Erik Eckstein
410b81b447 Force enabling SwiftCompilerSources in the build
This means that `bootstrapping=off` cannot be used anymore.
2024-05-06 17:22:27 +02:00
Alastair Houghton
7431b96798 [Build] Only add -lfts for linux-static-*.
Looks like I'd unconditionally added -lfts to the Foundation build flags.

rdar://123503470
2024-05-06 10:54:36 +01:00
Alastair Houghton
62c80a1073 [Build] A couple more Python fixes.
Remove unused import of `importlib.resources`.

Set `test_linux_static` to `False` if tests are disabled.

rdar://123503470
2024-05-03 10:46:22 +01:00
Alastair Houghton
3627507eb1 [Build] Further static Linux SDK support changes.
Fix some indentation issues.

Change `build-script-impl` to make `build-linux-static` a positive argument.

Fix documentation for `--linux-archs` and `--linux-static-archs` (the options
are comma separated for `build-script`, but semicolon separated for
`build-script-impl`).

Set the default for `linux-static-archs` to `x86_64, aarch64` so that we
install the expected content in the toolchain.

Add missing default for `test_linux_static`.

Make sure to pass down `--skip-build-linux` and `--build-linux-static`.

Factor out config file generation and call it from the install step in `llvm.py`
as well as from the build step.

rdar://123503470
2024-05-03 09:12:49 +01:00
swift-ci
646bed5294 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-02 21:54:12 -07:00
Evan Wilde
f34d388bf2 Build: EarlySwiftDriver: Use consistent Foundation/Dispatch
The early swift driver build would switch the Dispatch and Foundation
build used while building between an initial clean build and an
incremental rebuild. The early swift driver should consistently use the
same Foundation and Dispatch for each build.

This change tells the early swift driver stops build-script from telling
the early driver build to use the Foundation and Dispatch that it built.
2024-05-02 13:56:49 -07:00