Commit Graph

934 Commits

Author SHA1 Message Date
Max Desiatov
bfa726017a build: handle WASI in host_specific_configuration.py 2023-07-22 13:49:10 +01:00
Butta
ae6ff02d1b Revert "Revert "build: bootstrap SwiftPM with forked and not host clang""
This reverts a3dd8d677, which should be fixed by apple/swift-package-manager#6721.
2023-07-19 07:59:53 +05:30
Max Desiatov
0a1ae45ea6 Merge pull request #61376 from apple/maxd/build-alpine-product
Currently, when building LLVM/clang on Alpine Linux, CMake toolchain file specifies incorrect `<cpu_arch>-unknown-linux-musl` target, which makes the build immediately fail. Correct target that allows building on Alpine should be specified as `<cpu_arch>-alpine-linux-musl`, with `<cpu_arch>` replaced with respective CPU platform, e.g. `aarch64`.
2023-07-18 14:05:37 +02:00
Alastair Houghton
a3dd8d6777 Revert "build: bootstrap SwiftPM with forked and not host clang" 2023-07-17 20:01:06 +01:00
Kuba Mracek
08fee9d5e6 Add arm64_32 as a valid freestanding arch 2023-07-13 09:07:18 -07:00
Max Desiatov
c1d2d8580c Use clang -print-target-triple instead of clang --version 2023-07-13 15:19:42 +01:00
Alastair Houghton
4d4b1fc151 Merge pull request #64629 from finagolfin/spm-cc
build: bootstrap SwiftPM with forked and not host clang
2023-07-12 08:59:30 +01:00
Max Desiatov
501a5daab0 build: enable handling of alpine-linux-musl triple
Currently, when building LLVM/clang on Alpine Linux, CMake toolchain file specifies incorrect `<cpu_arch>-unknown-linux-musl` target, which makes the build immediately fail. Correct target that allows building on Alpine should be specified as `<cpu_arch>-alpine-linux-musl`, with `<cpu_arch>` replaced with respective CPU platform, e.g. `aarch64`.
2023-07-05 22:13:51 +01:00
Mishal Shah
80e4e0465c Merge pull request #66530 from swift-riscv/add-riscv64-as-supported-architecture
Add riscv64 as supported architecture on linux
2023-07-03 12:19:32 -05:00
Alastair Houghton
e5ece81cc9 [Freestanding] Remove uses of stat() and dlsym().
We shouldn't be using stat() or dlsym() in the freestanding
runtime.

rdar://111214571
rdar://106555012
2023-06-23 17:05:59 +01:00
swift-ci
dc0a3c9143 Merge pull request #66652 from apple/maxd/bootstrap-bsd-cmake
swift_build_support cmake.py: allow bootstrapping CMake on FreeBSD
2023-06-14 20:30:30 -07:00
Ben Barham
e0c9aa1398 Merge pull request #66440 from bnbarham/sprinkle-utf8
[Build] Read all shell output as UTF-8
2023-06-14 17:35:11 -07:00
swift-ci
38050cde87 Merge pull request #66641 from apple/maxd/bsd-arm64
swift_build_support: support FreeBSD on arm64 in `targets.py`
2023-06-14 16:20:15 -07:00
Max Desiatov
c5d6e3ca05 swift_build_support cmake.py: allow bootstrapping CMake on FreeBSD
A given FreeBSD version may not always have latest CMake installed if any at all. Let's bootstrap it the same way we do it on Linux.
2023-06-15 00:04:39 +01:00
Max Desiatov
2dc5da0366 swift_build_support: support FreeBSD on arm64 in targets.py 2023-06-14 20:47:52 +01:00
Mike Ash
110f428780 [Runtime] Add tracing for section scans.
Section scans (for metadata, protocols, etc.) can be costly. This change adds tracing calls to those scans so we can more easily see how much time is spent in these scans and where they're initiated.

This adds an os_signpost implementation controlled by SWIFT_STDLIB_TRACING, and a default empty implementation for when that's disabled.

rdar://110266743
2023-06-14 12:07:44 -04:00
futurejones
ea330b269c add riscv64 as supported architecture on linux 2023-06-10 15:43:28 +09:00
Ben Barham
02603e37ac [Build] Read all shell output as UTF-8
Encodes the output back into ASCII as there's been issues with printing
UTF-8 in the past.

Resolves rdar://110412212.
2023-06-07 15:35:55 -07:00
Max Desiatov
bbfd410e7b swift_build_support/cmake.py: parallelize default CMake build (#66212)
CMake's bootstrapping script can't infer a number of parallel build jobs from the number of CPU cores on its own, which means that it's not parallelized by default. Let's get the value of CPU cores when `build_jobs` argument is not explicitly set.

`make -j` only has an effect on CMake's post-bootstrap build jobs, while a substantial amount of time was spent building code sequentially in CMake's bootstrap script without that `--parallelize` option, which is called on a line preceding the `make -j` invocation.
2023-05-30 22:29:15 +01:00
Alex Lorenz
5f7f5daa52 [cxx-interop] add a build setting to control whether the <swift/bridging> header is shipped with compiler
rdar://109050483
2023-05-08 15:59:38 -07:00
Kim de Vos
fc68e770ae Verify swift-syntax code gen 2023-05-04 11:14:54 -07:00
Kuba (Brecka) Mracek
683985e824 Add missing armv7 variants into the lists of allowed CPU types for the 'freestanding' stdlib builds (#65633) 2023-05-04 08:36:43 -07:00
Alex Hoppen
6f36379abe Revert "[SwiftSyntax] Verify swift-syntax code gen" 2023-05-01 16:25:01 -07:00
Kim de Vos
b45411283d Merge pull request #65439 from kimdv/kimdv/use-local-git-repo-for-code-gen 2023-05-01 20:58:17 +02:00
Kim de Vos
05244476bb Verify swift-syntax code gen 2023-04-26 20:28:29 +02:00
Saleem Abdulrasool
f11617392e build: enable control over the C++ interop modules
Treat the C++ interop modules similar to the Concurrency and
StringProcessing modules, enabled through a top-level global flag.  The
flag now enables disabling the C++ interop modules when the standard
library is built.

Based on the original work by Egor Zhdan!
2023-04-26 11:22:28 -07:00
Alex Hoppen
5321be217b [SwiftSyntax] Enable test fuzzing for SwiftSyntax PR job
Companion of https://github.com/apple/swift-syntax/pull/1340
2023-04-13 18:32:59 -07:00
Alex Hoppen
86ecac5041 [Build] Enable RawSyntaxValidation for SwiftSyntax PR job 2023-04-06 09:59:15 -07:00
Alastair Houghton
316dfaffa1 Merge pull request #64714 from al45tair/eng/PR-107360391
[Backtracing] Support specifying a hard-coded path for swift-backtrace.
2023-03-30 18:28:48 +01:00
Alastair Houghton
0261a29fee [Backtracing] Support specifying a hard-coded path for swift-backtrace.
Add a way to disable dynamic lookup of the backtracer path, for situations
where a hard-coded path makes more sense.

rdar://107360391
2023-03-29 15:08:48 +01:00
Kuba (Brecka) Mracek
1a3cbfab7c Add MinimalStdlib build-script product, build is in main CI jobs and PR testing jobs (#64492) 2023-03-28 10:29:34 -07:00
Butta
c9158963ab [build] Make sure SPM is built with the forked clang, not the host clang 2023-03-27 00:33:29 +05:30
Alex Hoppen
d38bd10332 [SwiftSyntax] Add CMake argument to enable assertions in SwiftSyntax for Release+Assert builds
This does not do anything by itself, it needs a corresponding change in swift-syntax to pick up the CMake option and actually enable assertions.
2023-03-23 16:22:53 -07:00
Anthony Latsis
c9b1071456 Merge pull request #64428 from AnthonyLatsis/xcode-gen-opt
build-script: Don't build LLVM testing tools when generating Xcode projects
2023-03-20 20:32:57 +03:00
Anthony Latsis
f94f401a06 build-script: Don't build LLVM testing tools when generating Xcode projects 2023-03-16 20:58:14 +03:00
Alejandro Alonso
31389f7368 Merge pull request #64371 from Azoy/bye-bye-reflection
Remove Reflection
2023-03-15 10:13:46 -07:00
Mariusz Borsa
ed21728c7f Merge pull request #64286 from apple/m_borsa_enable_driver_asan_build
Add --enable-asan option in swift-driver
2023-03-14 12:22:27 -07:00
Alejandro Alonso
09b1476ddf Stop building Reflection 2023-03-14 11:49:38 -07:00
Mariusz Borsa
3c48261929 Add --enable-asan option in swift-driver
This is to support building the swift-driver with -sanitize=address when the Swift build preset specifies enable-asan. Without this option and with enable-asan in picture the entire Swift build fails due to ASAN initialization failure in swift-driver.
This commit is dependent on https://github.com/apple/swift-driver/pull/1310 being merged first

rdar://104661463
2023-03-10 09:28:47 -08:00
Kim de Vos
117982fad6 Remove gyb from swift-syntax 2023-03-08 09:43:21 +01:00
Alastair Houghton
106dd1956e [Backtracing] Fix test failures.
I'd inserted an extra line, which upset the line numbers in the backtracing
tests.

Also tweak the Python build script tests slightly so they work.

rdar://106234311
2023-03-06 11:28:16 +00:00
Alastair Houghton
1258d45152 [Backtracing] Build work.
Additional shimming required for some builds, as well as a few other build
related tweaks.

rdar://106234311
2023-03-04 15:46:30 +00:00
Mishal Shah
e256b56545 Merge branch 'main' into rebranch 2023-03-02 18:25:09 -08:00
Philippe Hausler
8a7f6009b9 Initial draft of observation 2023-02-27 17:09:00 -08:00
Erik Eckstein
2d789fc68e fix a python lint error 2023-02-02 10:45:12 +01:00
swift-ci
cde1cd2274 Merge remote-tracking branch 'origin/main' into rebranch 2023-02-01 09:53:46 -08:00
Eric Miotto
e1b4137282 LLVM product: amend installation path of compiler-rt libraries... (#63311)
...copied from the host toolchain

Addresses #62626, rdar://104724130
2023-02-01 09:41:41 -08:00
Ben Barham
b054afcfcc [Build] Use host generator tools when cross-compiling 2023-01-30 21:05:37 -08:00
Alejandro Alonso
c7a9360806 [Reflection] Build the _Runtime and Reflection modules (#62973)
* Move Runtime into _Runtime

Fix more _Runtime names

* Add availability to all API

* Build _Runtime and Reflection modules

* Use threading's mutex for all platforms

add stdlib include
2023-01-17 09:30:16 -08:00
Eric Miotto
881e16c668 Build-script: ensure we can target armv7k with watchOS 9 SDK (#63020)
Updating to match `SDKSettings.plist`

Addresses rdar://100563701
2023-01-16 14:11:45 -08:00