Commit Graph

5364 Commits

Author SHA1 Message Date
Robert Widmann
0869b519cd Revert "Fallback to building Cmake from source on all platforms, not just Linux (#33543)"
This reverts commit 539b241bf2.
2020-08-29 17:19:49 -07:00
Xi Ge
db0a6f74af Merge pull request #33691 from nkcsgexi/fix-67951012
swift_build_sdk_interfaces.py: adjust output directory path to an SDK-versioned directory
2020-08-29 06:21:32 -07:00
Xi Ge
dbd16d2e05 swift_build_sdk_interfaces.py: adjust output directory path to an SDK-versioned directory
When clients specify an output directory without SDK version, the script will change
the input so we emit all prebuilt module caches into SDK-versioned directories without
modifying the client side.

rdar://67951012
2020-08-28 21:58:37 -07:00
Kuba (Brecka) Mracek
7a6f84dc64 When building standalone stdlib, explicitly use C/C++ compilers from NATIVE_CLANG_TOOLS_PATH (#33675) 2020-08-28 20:50:20 -07:00
Doug Gregor
10fa19b2b5 Merge pull request #33674 from DougGregor/concurrency-objc-import-async
[Concurrency] Import Objective-C methods with completion handlers as async
2020-08-28 19:48:02 -07:00
swift-ci
11eac12d60 Merge pull request #33659 from gottesmm/pr-84ac4140f366657db17f220c96bca2d5cb988ddb 2020-08-28 19:30:01 -07:00
tbkka
539b241bf2 Fallback to building Cmake from source on all platforms, not just Linux (#33543)
* Fallback to building Cmake from source on all platforms, not just Linux

* Remove no-longer-used import
2020-08-28 13:26:29 -07:00
Mishal Shah
109b7b8a9b Disable LLDB tests in nightly package preset (67923799) 2020-08-28 00:09:56 -07:00
Doug Gregor
1e5d30f5ca [Concurrency] Import Objective-C methods with completion handlers as async
When a given Objective-C method has a completion handler parameter
with an appropriate signature, import that Objective-C method as
async. For example, consider the following CloudKit API:

    - (void)fetchShareParticipantWithUserRecordID:(CKRecordID
*)userRecordID
            completionHandler:(void (^)(CKShareParticipant * _Nullable shareParticipant, NSError * _Nullable error))completionHandler;

With the experimental concurrency model, this would import as:

    func fetchShareParticipant(withUserRecordID userRecordID: CKRecord.ID) async throws -> CKShare.Participant?

The compiler will be responsible for turning the caller's continuation
into a block to pass along to the completion handler. When the error
parameter of the completion handler is non-null, the async call
will result in that error being thrown. Otherwise, the other arguments
passed to that completion handler will be returned as the result of
the async call.

async versions of methods are imported alongside their
completion-handler versions, to maintain source compatibility with
existing code that provides a completion handler.

Note that this only covers the Clang importer portion of this task.
2020-08-27 21:30:13 -07:00
Eric Miotto
102d6387d9 [build] Don't execute dsymutil in parallel (#33654)
`dsymutil` is already multithreaded and can be memory intensive --
execute it one at a time.

Addresses rdar://63892559
2020-08-27 10:25:51 -07:00
Kuba (Brecka) Mracek
9de7b59388 Subsume SWIFT_STDLIB_USE_NONATOMIC_RC into SWIFT_STDLIB_SINGLE_THREADED_RUNTIME (#33643) 2020-08-26 21:28:30 -07:00
Michael Gottesman
d287963c4d [sil-mode] Change viewcfg integration to specify dot as a renderer. 2020-08-26 19:27:42 -07:00
Mishal Shah
63a846346a Merge pull request #33593 from owenv/update-argparse
[update-checkout] Update swift-argument-parser checkout to 0.3.0
2020-08-25 09:54:45 -07:00
Kuba (Brecka) Mracek
9ead8d57fa Add a single-threaded stdlib mode, use it for the 'minimal' stdlib (#33437) 2020-08-25 06:03:14 -07:00
Davide Italiano
e1d0ea2f80 Merge pull request #33616 from dcci/the-piper-at-the-gates-of-dawn
[Package] Fix passing -gline-tables-only when building.
2020-08-24 19:43:51 -07:00
Owen Voorhees
5c88421cea Update swift-argument-parser checkout to 0.3.0 2020-08-24 19:27:36 -07:00
swift-ci
a1652501c2 Merge pull request #33613 from apple/shahmishal/add-support-rebranch-repo 2020-08-24 14:28:54 -07:00
Davide Italiano
b9c899a390 [Package] Fix passing -gline-tables-only when building.
We should do regardless of whether we run the tests or not.
Also, clarify a comment while I'm here.
2020-08-24 12:56:59 -07:00
Davide Italiano
ead41b4b0c Merge pull request #33598 from dcci/for-fox-sake-is-a-great-album
[Package] When building a toolchain, don't copy the Resource directory.
2020-08-24 12:53:21 -07:00
Mishal Shah
7c5bb7d819 Update the master-rebranch scheme to include:
* swift-argument-parser
* swift-driver
* yams
2020-08-24 12:02:32 -07:00
Artem Chikin
faea5f0b72 Merge pull request #33563 from artemcm/CleanupDriverPM
[build-script] Add a default-enabled "clean" step for swift-driver and swiftpm products
2020-08-24 09:08:17 -07:00
Michael Gottesman
611d4b8307 [gardening] PlaygroundSupport is a build-script product now... remove dead-code remnants.
Just deleting dead code.
2020-08-22 18:49:55 -07:00
Davide Italiano
8337f961d8 [Package] When building a toolchain, don't copy the Resource directory.
Should dramatically improve the size of the snapshost produced,
as we don't have stdlib et similia included twice. Also, it helps when
producing fat binaries, as we don't have to implement any mechanism
for sandwiching all the slices together.
2020-08-22 16:32:05 -07:00
Artem Chikin
fc4ef192ae [build-script] Add a default-enabled "clean" step for swift-driver and swiftpm
Along with options to disable the mandatory clean using: `--skip-clean-swift-driver` and `--skip-clean-swiftpm`.

This will ensure that every invocation of build-script will, by default, clean up all build artifacts of these projects and re-build them from scratch.
This is needed for all builds because today arbitrary changes to the compiler can lead to us being unable to incrementally build components that are themselves written in Swift. This causes now-frequent failures in incremental build bots, and is a scenario that is encountered by developers. (For example see: rdar://65006593)

The proper long-term solution is to enable library evolution for these projects. Until this is done, the only safe thing to do is to always rebuild them.

Resolves rdar://65006593
2020-08-20 11:27:27 -07:00
Michael Gottesman
c8c807f349 Consistently use toggle_true instead of store_true when selected projects.
This allows for child cascading presets to mixin a parent preset and then
selectively turn off these projects. store_true in contrast can not be
overwritten making cascading impossible.
2020-08-18 18:10:19 -07:00
Saleem Abdulrasool
9ecd2a0022 build: switch to cl instead of clang-cl for lldb
clang has a bug where the template handling triggers an assertion.  This
switches the compiler to MSVC's compiler as a temporary workaround.
2020-08-18 17:57:19 -07:00
Michael Gottesman
bbac3c1bd8 Merge pull request #33525 from gottesmm/pr-a8947c6d9f8e57297f98ee0fe2796cc8f530b842
[build-presets.ini] Extract out osx_package no test into a mixin so we match how presets are setup for snapshots on Linux.
2020-08-18 13:08:29 -07:00
Kuba (Brecka) Mracek
db18deaf91 Add a SWIFT_RUNTIME_MACHO_NO_DYLD stdlib mode that doesn't dynamically look up sections in modules, and only assumes a single static module (#33441) 2020-08-18 11:46:42 -07:00
Dario Rexin
714561591a Merge pull request #33393 from drexin/wip-fix-linux-build
Don't build with stdlib assertions on Linux
2020-08-18 11:04:25 -07:00
Saleem Abdulrasool
c8e3b949ca build: add the temporary workaround to Swift and lldb as well
Ensure that we can build with the older toolchain when building Swift
and LLVM as well.
2020-08-18 09:07:10 -07:00
Artem Chikin
342f3dd2f6 Merge pull request #33281 from artemcm/SwiftDriverInCI
[build-preset] Add swift-driver to CI builder presets
2020-08-18 07:47:49 -07:00
Michael Gottesman
f756cc154d [build-presets.ini] Extract out osx_package no test into a mixin so we match how presets are setup for snapshots on Linux.
More importantly, it will allow for downstream projects to cascade on top of
snapshot no-test scheme, ensuring that as we modify/add projects, these other
downstream things will keep working.

The actual change here is NFC since I just extracted the preset.
2020-08-18 01:58:52 -07:00
Michael Gottesman
479a148c23 [build-toolchain] Add the ability to specify a prefix to prepend to the specific toolchain preset invoked. 2020-08-18 01:09:32 -07:00
Michael Gottesman
cf7c237489 [build-toolchain] Add support for specifying a preset file. 2020-08-18 01:06:56 -07:00
swift-ci
847c9fbceb Merge pull request #33518 from akyrtzi/utils-api-checker-enhancements 2020-08-17 21:04:57 -07:00
Kuba (Brecka) Mracek
28a2826ef4 Start using optimization (-O0/-O2/-O3/-Os) and debug (-g) flags from CMAKE_CXX_FLAGS_${CFLAGS_BUILD_TYPE} (#33388) 2020-08-17 19:26:24 -07:00
Argyrios Kyrtzidis
0701eb7d4c [utils/api_checker] Adjust the script for inferring imports from an SDK and add a couple of utility scripts 2020-08-17 18:31:40 -07:00
Saleem Abdulrasool
b1b66202cb build: allow using the old toolchain on the rebranched LLVM 2020-08-17 23:52:47 +00:00
Saleem Abdulrasool
14ad9cc11c build: add a builder script for the rebranch 2020-08-17 11:54:33 -07:00
Kuba (Brecka) Mracek
aa924196ff Add a flag to build the stdlib without COMPATIBILITY_OVERRIDE (#33438) 2020-08-14 17:06:38 -07:00
Mishal Shah
3e1c2c45ba Merge pull request #33297 from apple/shahmishal/source-compat-preset-arm64
[Preset] Source compat suite cross compile for macOS arm64
2020-08-14 14:05:14 -07:00
Mishal Shah
e54127b152 Clean up the whitespace in build-script 2020-08-13 21:55:44 -07:00
Doug Gregor
f4082b9c00 Merge pull request #33457 from DougGregor/concurrency-contextual-await
[Concurrency] Treat 'await' as a contextual keyword.
2020-08-13 19:18:02 -07:00
Kuba (Brecka) Mracek
e2e69578a6 For the 'minimal' stdlib, disable Objective-C interop (#33427) 2020-08-13 15:26:04 -07:00
Kuba (Brecka) Mracek
7378afd1bf Pass -isysroot to both CFLAGS and LDFLAGS when building ninja (#33414)
* Pass -isysroot to both CFLAGS and LDFLAGS when building ninja

* Update test expectations too
2020-08-13 15:25:20 -07:00
Mishal Shah
d52a159903 Remove old symlink before creating new symlink 2020-08-13 12:28:31 -07:00
Doug Gregor
dd075c64c9 [Concurrency] Treat 'await' as a contextual keyword.
Replace the uglified '__await' keyword with a contextual keyword
'await'. This is more of what we would actually want for the
concurrency model.

When concurrency is enabled, this will be a source-breaking change,
because this is valid Swift code today:

```swift
  struct MyFuture<T> {
    func await() ->  }
    func doSomething() {
      let result = await()
    }
  }
```

but the call to `await()` will be parsed as an await expression when
concurrency is enabled. The source break is behind the experimental
concurrency flag, but this way we can see how much of an issue it is
in practice.
2020-08-13 10:34:51 -07:00
Mishal Shah
c123f4206f [Build System] Move host lipo step after install step 2020-08-12 22:05:29 -07:00
Kuba (Brecka) Mracek
ef89b0dc51 Add a 'standalone_minimal' preset to build a minimal, static, OS independent, self-contained binaries of stdlib. (#33286) 2020-08-12 07:28:34 -07:00
Doug Gregor
17dd2d04c2 Merge pull request #33408 from DougGregor/async-closures
[Concurrency] Add support for 'async' closures.
2020-08-11 17:22:09 -07:00