Commit Graph

867 Commits

Author SHA1 Message Date
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
Hamish Knight
50320d2a81 [cmake] Propagate lit_jobs to LLVM_LIT_ARGS
Missed this when I originally added the
`--lit-jobs` build-script option, propagate the value
provided to `LLVM_LIT_ARGS` in addition to
`SWIFT_LIT_ARGS`.
2023-01-12 16:02:05 +00:00
Alex Hoppen
7c251b2c14 Merge pull request #62584 from ahoppen/ahoppen/lint-swiftsyntax
[build] Verify that SwiftSyntax is correctly formatted
2022-12-15 21:16:12 +01:00
Alex Hoppen
a1a0cadb56 [build] Verify that SwiftSyntax is correctly formatted
In SwiftSyntax and swift-format, run swift-format on SwiftSyntax to make sure it’s correctly formatted.
2022-12-14 23:14:46 +01:00
Dario Rexin
39aef7d2ef Merge pull request #62446 from drexin/wip-103080745
[Build] Pass missing build parameters
2022-12-14 10:09:24 -08:00
Butta
dc06fc0160 [android][test] Disable new C++ Interop test
Also, add flag and comment from `build-script-util` that was missed in the
recent Python translation, #38507.
2022-12-12 01:11:46 +05:30
Dario Rexin
b3e77c2e3c Update cmake_product.py 2022-12-07 14:48:50 -08:00
Dario Rexin
0de45b03b3 [Build] Pass missing build parameters
Some parameters were accidentally dropped with the introduction of https://github.com/apple/swift/pull/38507.

rdar://103080745
2022-12-07 13:40:58 -08:00
Max Desiatov
0eeadffce0 Merge pull request #61696 from apple/maxd/generate-toolchain
swift_build_support: unify CMake toolchain code

Currently, a lot of products defined in `utils/swift_build_support` contain duplicated code that checks for Darwin/Linux triples and generates an appropriate CMake toolchain file. Since all of these products inherit from the `Product` class, it makes sense to reduce this code duplication by refactoring it into a single function.
2022-12-07 16:27:33 +00:00
Max Desiatov
e80e7e3487 Merge pull request #62234 from apple/maxd/cmark-build-cleanup
build-script-impl: remove CMark cases as unused

CMark was converted from a `build-script-impl` product to `build-script` product in https://github.com/apple/swift/pull/37102. After that change, some of the remaining mentions of CMark in `build-script-impl` were unused and can be removed.
2022-12-07 10:19:21 +00:00
Mishal Shah
2fb26918fe Drop Python2.7 from the CMake definition (#62305) 2022-12-02 11:08:25 -08:00
Ethan Kusters
3cd4b6354d Revert "Support cross compilation in macOS toolchain builds (#62306)" (#62369)
This reverts commit a36ab6e287.

The change to support cross compilation of `docc` in macOS toolchains
is breaking nightly toolchain builds – this will unblock them.

It looks like the `--test-product` option Swift-DocC's build script passes to
SwiftPM is supported when building for multiple architectures but not when
testing. PR toolchain builds don't run tests which is why this wasn't caught
before merging.

Resolves rdar://102908495
2022-12-02 10:28:59 -08:00
Doug Gregor
b6605487c6 Merge pull request #62326 from DougGregor/swift-host-libs 2022-12-01 19:55:07 -08:00
Ethan Kusters
a36ab6e287 Support cross compilation in macOS toolchain builds (#62306)
Updates the build script used in SwiftCI for building the `docc`
executable as part of Swift.org toolchains to support cross compilation.

Currently the `docc` executable included in the otherwise universal
macOS toolchain only supports x86_64. This resolves the issue.

Resolves rdar://102870094
Closes https://github.com/apple/swift-docc/issues/433
2022-12-01 11:46:00 -08:00
Doug Gregor
36321dded8 Only install SwiftSyntax when we can build it 2022-11-30 22:37:21 -08:00
Doug Gregor
78ef82f16e [Build] Make sure to install SwiftSyntax into the toolchain
... otherwise we build a broken compiler in the toolchain, because the
shared libraries for SwiftSyntax aren't present.
2022-11-30 21:35:11 -08:00
Doug Gregor
52d513af6b Build swift-syntax as shared libraries instead of static libraries.
This allows the various binaries (swift-frontend, SourceKit, etc.) to
share the same code, as well as allowing plugins to link against these
shared libraries.
2022-11-30 15:31:57 -08:00
Doug Gregor
b6eded76d6 [Build] Start installing the "early" Swift Syntax into the toolchain 2022-11-30 13:54:03 -08:00