Commit Graph

848 Commits

Author SHA1 Message Date
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
Max Desiatov
99dedeeba3 swift_build_support: renamegenerate_toolchain_file 2022-11-30 11:50:11 +00:00
Max Desiatov
ba2d6254ef swift_build_support: unify CMake toolchain code 2022-11-30 11:03:22 +00:00
Max Desiatov
998856df8a build_script_invocation.py: don't pass cmark args 2022-11-29 14:03:15 +00:00
Anthony Latsis
05756a47a7 Merge pull request #62224 from AnthonyLatsis/fix-xcode-build
build: Fix Xcode project generation
2022-11-29 16:11:34 +03:00
Max Desiatov
4ee657b3fb build_script_invocation.py: avoid invalid --skip-test-cmark 2022-11-29 11:15:33 +00:00
Max Desiatov
e1076b3298 build_script_invocation.py: remove unused CMark opt 2022-11-29 11:15:33 +00:00
Eric Miotto
38a10bbd90 Merge pull request #62159 from edymtt/use-libcxx-from-darwin-sdks-llvm-product
Use libcxx from Darwin SDKs when building LLVM and Swift (LLVM product)

Those are present since Xcode 12.5, so we don't need to copy them
anymore from the toolchain

In this scenario, clean up any existing symlink in incremental builds to
avoid masking or causing errors in the future.

Took the chance to extract this logic to a different function in an attempt to improve readability

To ease review, the PR has two commits -- the first to extract the logic as is (showing that I did not alter the existing logic) and the second one to change its behaviour for Darwin (and address a minor issue when printing about the creation of symlinks)

Addresses rdar://102387542
2022-11-28 07:16:41 -08:00
Anthony Latsis
c50d2214cb build: Mirror LLVM+Xcode-specific build-script-impl logic in CMake build-script product
This fixes the behavior of `--xcode`, which was relying on this logic and was
compromised when LLVM became a build-script product.
2022-11-22 19:44:14 +03:00
Dario Rexin
79e385e172 [Build] Include deployment version in target triple
rdar://102515724
2022-11-18 11:29:10 -08:00
Dario Rexin
55c0084b9e [Build] Use llvm-cmake-flags in llvm build-script product
rdar://102476062
2022-11-17 10:56:57 -08:00
Eric Miotto
6add3c043f Use libcxx from Darwin SDKs when building LLVM and Swift (LLVM product)
Those are present since Xcode 12.5, so we don't need to copy them
anymore from the toolchain

In this scenario, clean up any existing symlink in incremental builds to
avoid masking or causing errors in the future.

Addresses rdar://102387542
2022-11-17 09:34:29 -08:00
Eric Miotto
cbfd7c29ed LLVM product: extract logic to handle libcxx headers in a separate ...
... function

This is done in anticipation of switching to use  headers from the SDKs
for Darwin, so to not grow any further the `build` method.
2022-11-17 09:30:12 -08:00
Dario Rexin
f63de71001 Merge pull request #38507 from drexin/wip-llvm-build-script
[Build] Make LLVM a build-script product
2022-11-16 20:44:13 -08:00
Robert Widmann
2d07f382c5 Delete _InternalSwiftSyntaxParser And Its Build Infrastructure
This is the start of the removal of the C++ implementation of libSyntax
in favor of the new Swift Parser and Swift Syntax libraries. Now that
the Swift Parser has switched the SwiftSyntaxParser library over to
being a thin wrapper around the Swift Parser, there is no longer any
reason we need to retain any libSyntax infrastructure in the swift
compiler.

As a first step, delete the infrastructure that builds
lib_InternalSwiftSyntaxParser and convert any scripts that mention
it to instead mention the static mirror libraries. The --swiftsyntax
build-script flag has been retained and will now just execute the
SwiftSyntax and Swift Parser builds with the just-built tools.
2022-11-02 10:35:29 -07:00
Dario Rexin
3f80cb6712 [Build] Make LLVM a build-script product
rdar://80733826
2022-10-30 22:47:29 -07:00
Alex Hoppen
ca09204667 Merge pull request #61516 from ahoppen/ahoppen/swift-format-ci
Build swift-format as part of CI testing and install it into open source toolchains
2022-10-28 14:33:38 +02:00
Alex Hoppen
4512cb0981 Build swift-format as part of CI testing
Build swift-format whenever SwiftSyntax is being built and install it whenever sourcekit-lsp is installed.
2022-10-27 09:24:36 +02:00
Becca Royal-Gordon
e2f76c961c [NFC] Print build-script timings to stderr 2022-10-18 17:21:29 -07:00
Max Desiatov
3e8d7da798 swift_build_support: make build duration more readable (#61536)
`build-script` invocations print a total duration summary at the end of the build, like this:
```
Total Duration: 4558.030000000001
```
With this change build duration summary is printed as
```
Total Duration: 487.93 seconds (8m 7s)
```
2022-10-13 15:55:38 +01:00