Commit Graph

5698 Commits

Author SHA1 Message Date
Alex Hoppen
8ec8516893 Remove ByteTree serialization format
It was originally designed for faster trasmission of syntax trees from
C++ to SwiftSyntax, but superceded by the CLibParseActions. There's no
deserializer for it anymore, so let's just remove it.
2021-01-14 20:37:49 +01:00
Robert Widmann
58f7a1021c Merge pull request #35406 from CodaFi/versionilitude
Trade Usages of -m${platform}-version-min For -target
2021-01-13 13:30:02 -08:00
Saleem Abdulrasool
d5fadcca5f Merge pull request #35384 from compnerd/windows-differential
CI: disable 4 tests, enable autodiff tests on Windows
2021-01-13 13:15:06 -08:00
Mishal Shah
399af3f6e5 Merge pull request #35371 from apple/main-bump-version-5.4
Bump the Swift Version to 5.4
2021-01-13 11:55:01 -08:00
Robert Widmann
b436825948 Trade Usages of -m${platform}-version-min For -target
There's no reason to use -m${platform}-version-min as of clang-11/Xcode 11. Clang is now smart enough to parse -target and provide Apple's ld with the appropriate -platform_version argument string.
2021-01-13 11:00:39 -08:00
Andrew Trick
9f6d351bc7 Merge pull request #35400 from atrick/fix-viewcfg
Fix viewcfg to handle whitespace.
2021-01-13 10:07:14 -08:00
Andrew Trick
baeb6c04e6 Fix viewcfg to handle whitespace.
If any whitespace occurred between blocks, the script will not see the
"last_line" containing the branch and won't draw those CFG edges.
2021-01-12 19:16:09 -08:00
Saleem Abdulrasool
0511af57f5 CI: disable 4 tests, enable autodiff tests on Windows
This disables 4 tests:
  - DerivativeRegistrationTests.NonCanonicalizedGenericSignatureComparison
  - Reabstraction.diff param generic => concrete
  - Reabstraction.diff param and nondiff param generic => concrete
  - Reabstraction.result generic => concrete

Simultaneously, enable the remainder of the auto-diff test suite on
Windows.  These tests fail on Windows due to an invalid parameter during
the reabstraction of the generic differentiable parameters.  The
remainder of the auto-differentiation tests pass on all the platforms.
2021-01-12 14:42:50 -08:00
Mishal Shah
daf0061aa0 Bump the Swift Version to 5.4 2021-01-12 10:40:51 -08:00
Mishal Shah
85f5dbbfbd Skip running cmark tests on macOS 2021-01-11 17:03:38 -08:00
Varun Gandhi
c6490b23a8 Merge pull request #34963 from buttaface/droid
[android] Support building the host tools and with the static stdlib
2021-01-11 07:42:41 -08:00
Mishal Shah
7556f9c34e Update release/5.4 scheme for indexstore-db, swift-package-manager, sourcekit-lsp, swift-tools-support-core and swift-driver 2021-01-07 23:31:32 -08:00
swift-ci
186717f583 Merge pull request #34628 from buttaface/native-clang 2021-01-06 15:54:22 -08:00
Jonas Devlieghere
d4c17cd981 Revert "[build] Use Xcode toolchain Python executables" 2021-01-06 15:01:00 -08:00
Robert Widmann
4bc7a63dbb Merge pull request #35219 from ackyshake/main
Conform to existing conventions for Vim ftplugin
2021-01-06 11:00:26 -08:00
Max Desiatov
52d9398c30 Merge pull request #34998 from apple/maxd/fix-apple-silicon
CMake: fix build for Apple Silicon hosts

When building with `build-script` using these arguments

```
utils/build-script --skip-build-benchmarks
  --skip-ios --skip-watchos --skip-tvos
  --swift-darwin-supported-archs "arm64"
  --sccache --release-debuginfo --test
```

the build fails with

```
ninja: error: 'stdlib/swift-test-stdlib-macosx-x86_64',
needed by 'stdlib/CMakeFiles/swift-test-stdlib', missing and no known rule to make it
```

I think that the "Getting Started" guide should avoid hardcoding `x86_64` arguments, and suggest using `$(uname -m)` instead. `SWIFT_PRIMARY_VARIANT_ARCH_default` could also get its value from `CMAKE_HOST_SYSTEM_PROCESSOR` in the root `CMakeLists.txt`.

Resolves SR-13943.
2021-01-06 18:05:28 +00:00
Dave Lee
ad2873da26 Merge pull request #35199 from apple/build-Use-Xcode-toolchain-Python-executables
[build] Use Xcode toolchain Python executables
2021-01-05 14:31:26 -08:00
Daniel Duan
3eab86185e [build] Make home directory portable
Using `os.path.expanduser('~')` is more portable (in case we want to use
this script on Windows some day in the future).
2020-12-24 20:51:15 -08:00
Akshay Hegde
6c38a6b82a Conform to existing conventions for Vim ftplugin
This commit adds standard conventions for Vim filetype plugins:

- Allows users to opt out of using the provided ftplugin file, if they
  choose to install and use another set of runtime files for Swift
  (which offers its own version of ftplugin for Swift), It also prevents
  this ftplugin file from being sourced again if a ftplugin file for
  Swift was already sourced. Vim's documentation on this recommends
  offering users this option as well, under the "DISABLING" section
  of `:help write-filetype-plugin`).

- Adds the `b:undo_ftplugin` buffer local variable, which is used to
  undo the filetype settings when the `:setfiletype` command is used
  (See :help `undo_ftplugin`). Also prefer using the full names for Vim
  settings instead of short ones as they are more readable.

The above conventions are in place in many of the ftplugin files
shipped with Vim, so they can be used as a reference, as well.
2020-12-24 01:01:04 -08:00
Dave Lee
89113851bd quotes 2020-12-22 16:13:12 -08:00
Dave Lee
54dc8236e3 [build] Use Xcode toolchain Python executables 2020-12-22 16:08:58 -08:00
swift-ci
a4112eb18d Merge pull request #35173 from gottesmm/pr-bda612d38a584f3f9ba7f8e2b5479873d3cdb6fa 2020-12-20 18:30:42 -08:00
Michael Gottesman
694c1982bd [sil-mode.el] Improve handling of box types by sil-mode-display-function-cfg
Specifically, I changed how sil-mode-display-function-cfg searches for the
start/end of the SIL function body where the current point is. Previously, we
just searched for the exact strings "{" and "}" backwards and forwards
respectively. That was insufficient in the context of box types that use those
characters.

Instead with this change, we convert the aforementioned static search to a regex
search. Our regex match "{$" for the beginning of the SIL function and "^} //
end sil function '" or "^}" which I think will generally work to get the correct
body. NOTE: We first check for the end sil function variant.
2020-12-20 16:13:33 -08:00
Mishal Shah
4786a67fd3 Merge pull request #35143 from apple/shahmishal-patch-1
Add support for rebranch in update-checkout script
2020-12-18 23:45:24 -08:00
Rintaro Ishizaki
8ef504acf3 Merge pull request #35050 from rintaro/ide-completion-rdar72198530
[CodeCompletion] Annotate 'async' functions/initializers in results
2020-12-18 09:29:07 -08:00
Mishal Shah
69f1f06712 Add support for rebranch in update-checkout script 2020-12-17 13:40:17 -08:00
Mishal Shah
8f136f3f72 Merge pull request #35092 from apple/shahmishal/update-xcode-version
Add support for Xcode 12.3 (12C33)
2020-12-15 00:40:15 -08:00
Mishal Shah
1653edc4ad Add support for Xcode 12.3 (12C33) 2020-12-14 20:00:11 -08:00
Mishal Shah
91034bcd92 Update the update-checkout config to support Swift 5.4 branches 2020-12-14 19:46:42 -08:00
Robert Widmann
0557e74be1 Merge pull request #34351 from keith/ks/make-python_format-script-executable
Make python_format script executable
2020-12-14 15:18:45 -08:00
Rintaro Ishizaki
4286c44e72 [CodeCompletion/SourceKit] Consolidate some chunk kinds
Consolidate ThrowsKeyword, RethrowsKeyword, and AsyncKeyword to
EffectsSpecifierKeyword.
Abolish 'key.throwsoffset' and 'key.throwslength' as they aren't used.
2020-12-14 12:25:30 -08:00
Butta
c74884ce30 [build] Make it possible to actually build the stdlib with a prebuilt clang 2020-12-13 18:22:33 +05:30
Butta
bd81fb8e13 Revert "Revert "[build-script] Move --native-{clang,llvm,swift}-tools-path flags into the Python build-script""
Also, fix two places where the LLVM path was wrongly employed to set up clang,
and use the Swift path in install_toolchain_path().
2020-12-13 18:22:33 +05:30
Nathan Hawes
388052b6ab [SymbolGraph][CursorInfo] Add option to SourceKit's CursorInfo request to include the SymbolGraph JSON
Adds a new 'key.retrieve_symbol_graph' option to the request. When set to 1 it
includes the JSON for a SymbolGraph containing a single node for the symbol at
the requested position.

This also extends the SymbolGraph library with a new entry point to get a graph
for a single symbol, and to additionally support type substitution to match the
existing CursorInfo behavior (e.g. so that when invoked on `first` in
`Array<Int>().first`, the type is given as `Int?` rather than `Element?`).

Resolves rdar://problem/70551509
2020-12-12 14:38:41 +10:00
Max Desiatov
33bc25be80 Fix remaining hardcoded references to x86_64 2020-12-08 17:12:23 +00:00
Butta
47d94da235 [android] Support building the host tools and with the static stdlib 2020-12-05 15:36:57 +05:30
Robert Widmann
46f53a0ce5 Merge pull request #34854 from keith/ks/nfc-remove-unnecessary-constant
[NFC] Remove unnecessary constant
2020-12-02 14:35:37 -08:00
Robert Widmann
4bbdc3948d Merge pull request #34903 from CodaFi/target-acquired
[NFC] Move Migrated SDK Target List into StdlibDeploymentTarget
2020-12-01 14:12:26 -08:00
Robert Widmann
f3666d0954 [NFC] Move Migrated SDK Target List into StdlibDeploymentTarget
Centralize management of this mapping.
2020-12-01 10:16:59 -08:00
Eric Miotto
8fc2598167 [build-script] Allow to tune dsymutil parallelism (#34795)
This should enable scaling when using machines with large amount of
RAM.

To better support machines with lower spec, process one binary per
dsymutil invocation (reverting #34149).

Add some (limited) facilities to gather the time taken to execute
dsymutil to better assist in tuning the parameter -- these are printed in
JSON format in the log to allow for easier scraping

```
{ "command": "dsymutil", "start": "2020-11-18T18:10:47" }
{ "command": "dsymutil", "end": "2020-11-18T18:14:45" }
```

Addresses rdar://71018443
2020-12-01 07:11:10 -08:00
Saleem Abdulrasool
d2b5a8e98d Merge pull request #34873 from compnerd/pythony
build: handle spaces in Xcode better (NFC)
2020-11-30 07:40:07 -08:00
Saleem Abdulrasool
f18dbf289e build: handle spaces in Xcode better (NFC)
Quote the path to the python interpreter.  Without this change, using a
path with a space in it will prevent CMake from configuring as the
python interpreter's path will be split.
2020-11-25 08:49:36 -08:00
Saleem Abdulrasool
dca9f7bbf4 build: handle spaces better when boostrapping Ninja
IF Xcode is installed into a location with spaces, we would fail to
compile due to improper quoting.  Quote the paths to ensure that ninja
can bootstrap properly.
2020-11-24 10:43:12 -08:00
Keith Smiley
de373246b8 Update utils/build-script
Co-authored-by: Xiaodi Wu <13952+xwu@users.noreply.github.com>
2020-11-21 19:15:20 -08:00
Keith Smiley
cff9b37dc7 [NFC] Remove unnecessary constant 2020-11-20 16:21:21 -08:00
Daniel Rodríguez Troitiño
32dac8b9d8 Merge pull request #34797 from drodriguez/windows-temp-tmp-and-tmpdir
[windows] Set TMP and TEMP, as well as TMPDIR.
2020-11-18 08:10:43 -08:00
Daniel Rodríguez Troitiño
b66b112e77 [windows] Set TMP and TEMP, as well as TMPDIR.
Seems that Windows uses TMP and TEMP (more details about why two in
https://devblogs.microsoft.com/oldnewthing/20150417-00/?p=44213), but
doesn't seem to use TMPDIR at all.

The changes set all three to the same value. I am not removing TMPDIR
just in case. It seems to avoid creating files in the other temporal
directories for the compilation and testing.

This temp directory should be clean up by the CI machines when
recreating the new working directory for the next build. Let's hope we
can stop having to babysit the CI servers every month.
2020-11-17 17:53:04 -08:00
Mishal Shah
806e0b5161 Merge pull request #34702 from apple/shahmishal/test/xcode12.2-rc
Add support to use Xcode 12.2 Release Candidate
2020-11-17 16:13:51 -08:00
Mishal Shah
429dcef8a4 Update utils/build-script
Co-authored-by: Ben Rimmington <me@benrimmington.com>
2020-11-17 16:13:32 -08:00
Eric Miotto
e55d6a80e8 Use dedicated module cache to build xctest, llbuild and Foundation (#34728)
This is a small step to ensure multiple build jobs running on the same
machine (e.g. in CI) do not stomp on each other.

This PR does not cover the version detection of the Swift compiler
during the CMake configuration -- in there the compiler gets called once
without any of the `CMAKE_Swift_FLAGS`.

Addresses rdar://71373494
2020-11-13 14:47:00 -08:00