Commit Graph

7640 Commits

Author SHA1 Message Date
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
Mishal Shah
6998ebd9ed Bump the Yams version to 5.0.6 to support Windows arm64 2024-05-08 15:50:18 -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
eeckstein
ade04a7945 Merge pull request #73417 from eeckstein/force-bootstrapping
Force enabling SwiftCompilerSources in the build
2024-05-07 07:55:23 +02: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
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
Saleem Abdulrasool
e0daf945fb Merge pull request #73378 from readdle/buildps1-websockets
utils: enable curl websockets support when building with `build.ps1`
2024-05-03 00:07:17 +09:00
Alastair Houghton
bac73d012a [Build] Add options to the Python build script tests.
Apparently I'd failed to add a couple of lines here.

rdar://123503470
2024-05-02 14:56:18 +01:00
Alastair Houghton
68598514c2 [Build] Fix Python linting issues.
The Python linter was complaining about import orders.

rdar://123503470
2024-05-02 14:56:18 +01:00
Alastair Houghton
29e38af1fe [Build] Fix a conflict resolution mistake.
Apparently I accidentally removed a `]` while resolving a conflict in
`build_script_invocation.py.`

rdar://123503470
2024-05-02 14:56:18 +01:00
Alastair Houghton
fdc8ffd36f [Build] Updated following initial comments from Eric.
Change the `--linux[-static]-arch` option to `--linux[-static]-archs`, on the
basis that it supports multiple values.

Other tidying.

rdar://123503470
2024-05-02 14:56:18 +01:00
Alastair Houghton
ae1c0455f3 [Build] Add the new fully-static Linux SDK.
Declare a new `LINUX_STATIC` SDK and configure it.

Add options to set the build architectures for the `LINUX` and
`LINUX_STATIC` SDKs, similar to what we have for Darwin, because
we'll be cross-compiling.

Also add an option to point the build system at the sources for
the musl C library, which we're using for `LINUX_STATIC`.

rdar://123503470
2024-05-02 14:56:18 +01:00
Emil Pedersen
d451c3e4e1 Merge pull request #73334 from Snowy1803/unified-lost-vars-statistics
Add compile flag for lost debug variables statistics
2024-05-01 18:03:32 -07:00
Alexander Smarus
b746145671 utils: enable curl websockets support when building with build.ps1 2024-05-01 21:17:04 +03:00
Emil Pedersen
711e964066 Fix the counters to sql script for Python 3 2024-04-30 13:19:16 -07:00
Hamish Knight
de9806e2fa [SourceKit] Introduce key for cancelling on close
Defaults to `true`.
2024-04-30 21:13:20 +01:00
Emil Pedersen
59d0bd4f64 Add compile flag for lost debug variables statistics 2024-04-29 18:38:37 -07:00
Alex Lorenz
7815f843a3 [android] do not build the builtin float overlay for android (NDK's clang module map doesn't have it) 2024-04-29 15:57:27 -07:00
Alex Lorenz
81d1fdde3f [android][build] clean up the android path handling 2024-04-29 15:51:49 -07:00
Alex Lorenz
63172291b7 [build utils] do not extract the android NDK when it's up to date 2024-04-29 15:49:54 -07:00
Byoungchan Lee
c31f1f5245 [python] Replace deprecated assertEquals with assertEqual in build graph test
`unitest.assertEquals` is deprecated in Python 3.2 and finally removed in
Python 3.12 [1]. Due to this, this test files in recent Linux distros,
like Ubuntu 24.04 or Fedora 38+. This patch replaces the deprecated
function with `assertEqual`.

[1] https://docs.python.org/3/whatsnew/3.12.html
2024-04-29 08:17:15 +09:00
Andrew Trick
a60f5c45a7 Fix dev-scripts/split-cmdline: quote ';' arguments
When printing an argument that contains ';', add back
the quotes that are normally stripped.

I regularly waste half a day building Swift only to find that I built
the wrong thing because everything after the semicolon is dropped from
the build script when it contains arguments like this:

'--llvm-install-components=libclang;libclang-headers'

Ideally, split-cmdline would just preserve the original quotes. But
this quick fix solves the problem in the cases that I care about.
2024-04-26 08:58:06 -07:00
Ben Barham
94c10c2a61 [Build] Pass in swift-syntax to SwiftPM
SwiftPM is using swift-syntax for its new manifest refactorings.
2024-04-25 14:37:16 -07:00
Mishal Shah
ed45c9cd2b Update the rebranch scheme to use stable/20240408 2024-04-23 12:44:03 -07:00
Mishal Shah
3332f3e948 Add preset to set bootstrapping=off for Linux 2024-04-22 17:21:04 -07:00
Hiroshi Yamauchi
4364612899 Merge pull request #71584 from hjyamauchi/crosscompiling-buildps1
Add cross-compiling support for the windows toolchain
2024-04-19 09:43:11 -07:00
Mishal Shah
38c8968ddd Merge pull request #73069 from apple/drop-swift-nio-swift-nio-ssl-from-main-scheme
Remove swift-nio-ssl from main scheme
2024-04-18 12:25:41 -07:00
Hiroshi Yamauchi
f6ab729ffd Add cross-compiling support for the windows toolchain
Co-authrored with @compnerd
2024-04-18 09:24:14 -07:00
Mishal Shah
cae177f7a5 Merge pull request #72931 from apple/maxd/log-async-algos
Add `swift-log` and `swift-async-algorithms` to checkouts
2024-04-17 22:13:24 -07:00
Mishal Shah
e36091e41c Add swift-nio back into the main scheme 2024-04-17 15:39:54 -07:00
Yuta Saito
e20e1c6be9 Merge pull request #73077 from kateinoigakukun/yt/split-wasi-sysroot-for-targets
[wasm] Split wasi-sysroot for wasi and wasip1-threads
2024-04-18 06:21:15 +09:00
Yuta Saito
1136d50969 [wasm] Split wasi-sysroot for wasi and wasip1-threads
libclang_rt.builtins library is placed in the clang resource directory
per OS and architecture, so "environment" field is not used to find the
library (except for android). wasi and wasip1-threads require different
target features, so we need to split wasi-sysroot for them.

Before
```
wasi-sysroot
├── include
├── lib
│   ├── wasi
│   │   └── libclang_rt.builtins-wasm32.a
│   ├── wasm32-wasi
│   │   ├── ...
│   │   └── libc.a
│   ├── wasip1
│   │   └── libclang_rt.builtins-wasm32.a
│   └── wasm32-wasip1-threads
│       ├── ...
│       └── libc.a
└── share
```

After
```
wasi-sysroot
├── wasm32-wasi
│   ├── include
│   ├── lib
│   │   ├── wasi ---------- (will be renamed to wasip1)
│   │   │   └── libclang_rt.builtins-wasm32.a
│   │   └── wasm32-wasi --- (will be renamed to wasm32-wasip1)
│   │       ├── ...
│   │       └── libc.a
│   └── share
└── wasm32-wasip1-threads
    ├── include
    ├── lib
    │   ├── wasip1
    │   │   └── libclang_rt.builtins-wasm32.a
    │   └── wasm32-wasip1-threads
    │       ├── ...
    │       └── libc.a
    └── share
```
2024-04-17 17:45:37 +00:00
Mishal Shah
d3ecd7f7b6 Remove swift-nio and swift-nio-ssl from main scheme 2024-04-16 15:27:42 -07:00
Saleem Abdulrasool
e3bd21ac72 Merge pull request #73058 from compnerd/download
utils: refactor `Fetch-Dependencies` for future changes
2024-04-17 06:53:35 +09:00
Saleem Abdulrasool
726bf5cabf utils: refactor Fetch-Dependencies for future changes
Future work to enable Android SDKs requires fetching additional
dependencies (e.g. Android NDK). Refactor the fetch dependencies method
to allow us to share the download logic rather than replicating it for
each piece. This will also allow us to fetch the Python dependency for
the ARM64 toolchain cross-compilation.
2024-04-16 10:33:36 -07:00
Artem Chikin
01d891ad99 Merge pull request #72834 from artemcm/UpstreamVisionOS
Introduce visionOS Platform
2024-04-15 09:33:49 -07:00
Rintaro Ishizaki
abaa638210 Merge pull request #73010 from rintaro/windows-compilerplugin
[Windows] Build SwiftCompilerPlugin module when testing swift
2024-04-12 16:59:13 -07:00
Rintaro Ishizaki
a16ad9c274 Merge pull request #71173 from rintaro/cmake-parservalidatoin
[CMake] Add option to perform SwiftParser validation by default
2024-04-12 15:03:31 -07:00
Tim Kientzle
a51ebde9f6 Merge pull request #72987 from tbkka/tkientzle-no-asserts-toolchains
Add -a/--no-asserts option to build a no-asserts (production) toolchain
2024-04-12 13:40:53 -07:00
Rintaro Ishizaki
1a06b94a73 [Windows] Build SwiftCompilerPlugin module when testing swift 2024-04-12 11:03:08 -07:00
Yuta Saito
9582f5d960 Merge pull request #72998 from kateinoigakukun/yt/fix-wasm-build-on-machost
[wasm] Define CMake options for stdlib explicitly for Darwin host build
2024-04-12 15:15:03 +09:00
Yuta Saito
934aea46d0 Merge pull request #72983 from kateinoigakukun/yt/enable-cxx-interop
[wasm] Enable Cxx module build
2024-04-12 15:08:30 +09:00
Mishal Shah
f0867486a2 Merge pull request #72991 from apple/shahmishal/curl-zlib-tag-update
Update curl and zlib on rebranch and next scheme
2024-04-11 22:22:39 -07:00
Yuta Saito
135f78ea08 [wasm] Define CMake options for stdlib explicitly for Darwin host build
The stdlib build for wasm target is failing on Darwin host due to
default values of some CMake options on Darwin host. We need to
explicitly define these options to make the build pass.
2024-04-12 03:06:02 +00:00
Evan Wilde
77a43afe0e Merge pull request #72989 from etcwilde/ewilde/pin-ninja-tag
Pin Ninja checkout to v1.11.1
2024-04-11 19:56:11 -07:00