Commit Graph

5078 Commits

Author SHA1 Message Date
Eric Miotto
b309c62a75 [build] set CMAKE_OSX_ARCHITECTURES in swift_cmake_options (#31414)
This augments #31023 to make sure CMake invokes the compiler checks
correctly -- this is needed to avoid errors in certain
configurations.

Addresses rdar://62339814
2020-04-30 09:34:36 -07:00
Michael Gottesman
5239668b29 Merge pull request #31357 from gottesmm/pr-8da45d36b934e1765dc6d4d12e7ae12bd5ad93b3
[viewcfg] Add an argparse based argument parser and enable the user to select to use dot instead of graphviz.
2020-04-28 12:24:26 -07:00
Ben Langmuir
bb89c46f06 Merge pull request #31015 from benlangmuir/sk-sanitize
[build-script] Add sanitizer options to sourcekit-lsp
2020-04-28 09:03:33 -07:00
Michael Gottesman
c8385b901e [viewcfg] Add an argparse based argument parser and enable the user to select to use dot instead of graphviz. 2020-04-27 18:19:01 -07:00
Doug Gregor
94e9153878 Merge pull request #31170 from DougGregor/build-module-triples
[CMake] Use proper module triples for the names of standard library modules
2020-04-23 23:57:50 -07:00
Doug Gregor
691633b097 Appease Python linter 2020-04-23 21:33:36 -07:00
Dario Rexin
f1ab4f86c7 Merge pull request #31065 from buttaface/android
[build-script-impl] Allow cross-compiling the host toolchain for Android
2020-04-22 14:00:56 -07:00
Saleem Abdulrasool
38768fba68 Merge pull request #31067 from RLovelett/pathsanitizingfilecheck-byte-sequence
test: Explicitly work with binary data in PathSanitizingFileCheck
2020-04-22 11:37:22 -07:00
Butta
16d599ecfa [build-script-impl] Allow cross-compiling the host toolchain for Android 2020-04-21 15:53:32 +05:30
Doug Gregor
b27b4d4bb6 [CMake] Use proper module triples for the names of standard library modules.
The standard library (and other Swift modules built by our CMake build system)
has been building module files with an architecture only (e.g., x86_64.swiftmodule)
rather than a proper module triple (x86_86-apple-macosx10.15,
x86_64-apple-ios13.0-simulator, etc.), unlike every other build
system. There are hacks in the compiler and other tools to cope with
this unnecessary build difference. Fix the module file names so we'll
be able to remove the hacks later.

Fixes rdar://problem/49071536.
2020-04-20 21:16:14 -07:00
Mishal Shah
b29558d4d3 [Update Checkout] Update scheme for release/5.3 2020-04-20 18:26:26 -07:00
Mishal Shah
682b375372 Merge pull request #30565 from buttaface/prefix
[build-script] Add the installation prefix to the toolchain path
2020-04-20 10:03:22 -07:00
Ryan Lovelett
041be040fc test: Explicitly work with binary data in PathSanitizingFileCheck
Python 3 uses the concepts of text and (binary) data instead of Unicode
strings and 8-bit strings. This change makes it explicit in Python 2 and
3 that this utility works with binary data instead of strings.

* print(bytes(r'(/|\\\\|\\\\\\\\)', encoding="ascii")) => b'(/|\\\\\\\\|\\\\\\\\\\\\\\\\)'
* print(bytes(r'(/|\\\\)', encoding="ascii"))          => b'(/|\\\\\\\\)'
* print(bytes(r'/', encoding="ascii"))                 => b'/'
* print(bytes(r'\\/', encoding="ascii"))               => b'\\\\/'
2020-04-16 22:47:28 -04:00
Davide Italiano
6e6761e4c4 Merge pull request #31023 from apple/also-swift-needs-that
[build-script] Pass CMAKE_OSX_SYSROOT to swift_cmake_options too.
2020-04-15 12:00:59 -07:00
Mishal Shah
dba042489a [Preset] Generate line number debug information only to reduce the symbols toolchain size 2020-04-14 18:19:58 -07:00
Mishal Shah
050123283b Merge pull request #31012 from apple/shahmishal/drop-swift-api-digester-dsym
Disable creating swift-api-digester dSYM to reduce toolchain size
2020-04-14 17:44:01 -07:00
Davide Italiano
e60fe92f61 [build-script] Pass CMAKE_OSX_SYSROOT to swift_cmake_options too. 2020-04-14 13:27:40 -07:00
Mishal Shah
0f5bdb4949 Add a comment for removing debug symbols for swift-api-digester from the toolchain 2020-04-14 10:51:44 -07:00
Ben Langmuir
5eb14326f0 [build-script] Add sanitizer options to sourcekit-lsp
For now, default to no sanitizers.
2020-04-14 10:33:38 -07:00
Mishal Shah
9ae46a3473 Disable creating swift-api-digester dSYM to reduce toolchain size 2020-04-14 09:30:50 -07:00
Ben Langmuir
43bb415668 Merge pull request #30963 from benlangmuir/isdb-san
[build-script] Add sanitizer support to indexstore-db product
2020-04-14 09:28:55 -07:00
Saleem Abdulrasool
36667b9629 Merge pull request #31006 from compnerd/explicit-paths
build: explicitly pass the path to python2,python3
2020-04-14 08:41:44 -07:00
David Zarzycki
80f0e39e1a [line-directive] Escape literal '['
New versions of Python warn if the literal is not escaped. Specifically:

    "Support for nested sets and set operations in regular expressions as in
    Unicode Technical Standard #18 might be added in the future. This would
    change the syntax. To facilitate this future change a FutureWarning will
    be raised in ambiguous cases for the time being. That include sets
    starting with a literal '[' or containing literal character sequences
    '--', '&&', '~~', and '||'. To avoid a warning, escape them with a
    backslash. (Contributed by Serhiy Storchaka in bpo-30349.)"

https://docs.python.org/dev/whatsnew/3.7.html
2020-04-14 07:19:25 -04:00
Saleem Abdulrasool
fa6bedeccd build: explicitly pass the path to python2,python3
Explicitly pass the path to the python interpreter on macOS by using
`xcrun` to find the tools.
2020-04-13 20:29:29 -07:00
Ben Langmuir
65fe324733 Fix macOS indexstore-db preset 2020-04-13 16:13:52 -07:00
Ben Langmuir
1d7ce7efe5 [build-script] Add sanitizer support to indexstore-db product
Support the usual `--enable-*san options`, but also add a
`--test-indexstore-db-santitize-all` that runs the tests once for each
sanitizer. Sanitizing just indexstore-db with a regular toolchain should
be much faster than using sanitized compilers.
2020-04-13 15:39:36 -07:00
Robert Widmann
fa1e9df207 Merge pull request #30981 from omochi/run-test-jobs
[run-test] add `--build-jobs` option
2020-04-12 10:42:34 -07:00
Robert Widmann
22b0526917 Merge pull request #30082 from 3405691582/OpenBSD_Port_Build
Build system recognizes OpenBSD.
2020-04-12 09:30:17 -07:00
omochimetaru
081ffaa8d5 [run-test] add --build-jobs option 2020-04-12 08:43:55 +09:00
Saleem Abdulrasool
c505d19045 vim: add differentiability_witness to SIL syntax
Add the keyword from the experimental auto-differentiation functionality.
2020-04-11 10:49:09 -07:00
Dario Rexin
2257667ad3 Merge pull request #30864 from drexin/wip-fix-static-executable
Fix linker flags for -static-executable
2020-04-08 22:01:40 -07:00
Argyrios Kyrtzidis
1b26b96f05 Merge pull request #30897 from dan-zheng/autodiff-cleanup
[AutoDiff] Clean up syntax.
2020-04-08 21:07:01 -07:00
Mishal Shah
e4aa8a90a4 [Checkout] Update checkout scheme for release/5.3 2020-04-08 16:50:55 -07:00
Dario Rexin
e4e6c16319 Fix linker flags for -static-executable
Also adds a test to ensure it does not break in the future
2020-04-08 13:25:27 -07:00
Dan Zheng
73f0560af5 [AutoDiff] Standardize on "differentiability parameter" terminology.
Change "differentiation parameter" to "differentiability parameter", matching
terminology in docs/DifferentiableProgramming.md.
2020-04-08 13:01:17 -07:00
Dan Zheng
5b38853d76 [AutoDiff] Remove DifferentiableAttributeFuncSpecifier.
Remove unused `DifferentiableAttributeFuncSpecifier` syntax node.
2020-04-08 13:01:00 -07:00
Robert Widmann
e162d0a2ba Merge pull request #30850 from gribozavr/run-test-filter
utils/run-test: added lit's --filter option
2020-04-08 12:49:45 -07:00
Dan Zheng
1addfe0ea3 [AutoDiff] Remove @differentiable attribute jvp: and vjp: argument syntax.
Remove `MaybeJVP` and `MaybeVJP` from `DifferentiableAttributeArguments`.
2020-04-08 10:22:56 -07:00
Doug Gregor
b6df6ef59f Merge pull request #30843 from DougGregor/consistent-simulator-triples
[Build] Use simulator triples consistently
2020-04-07 20:23:51 -07:00
Rintaro Ishizaki
496c303ab5 Merge pull request #30865 from rintaro/sourcekit-completion-rdar61367416
[SourceKit] Don't use diagnostics to indicate fast-completion
2020-04-07 17:58:19 -07:00
Rintaro Ishizaki
4870d1c017 [SourceKit] Don't use diagnostics to indicate fast-completion
Add 'key.reusingastcontext: 1' to the response instead.
Using diagnostics can be a noise to indexing log clients.

rdar://problem/61367416
2020-04-07 16:26:00 -07:00
Doug Gregor
78880ffc1a Merge pull request #27776 from owenv/catch_revamp_take_4
[SE-0276] Support multiple patterns in catch clauses
2020-04-07 12:31:33 -07:00
Dmitri Gribenko
9f3a6cdeef utils/run-test: added lit's --filter option
Added a pass through of lit's `--filter` option to utils/run-test, to
allow running a subset of tests, for example `./utils/run-test
--filter=irgen` runs tests in `test/IRGen` and any other test with
"irgen" in its name.
2020-04-07 16:28:03 +02:00
Doug Gregor
044613a13b [build-script] Add -simulator to simulator target triples. 2020-04-06 16:52:56 -07:00
Stephen Canon
248c554524 Add Float16 to stdlib (#30130)
Add Float16 (IEEE 754 binary16) to the standard library, plus assorted runtime support operations.

Swift Evolution thread: https://forums.swift.org/t/se-0277-float16/33546
2020-04-06 17:57:44 -04:00
Jonas Devlieghere
dc57ddc8a3 Merge pull request #30749 from MForster/fix-lldb-toolbox
Fix the LLVM repo path in lldbToolBox.py
2020-04-06 08:49:51 -07:00
Owen Voorhees
43e2d107e1 [SE-0276] Implement multi-pattern catch clauses
Like switch cases, a catch clause may now include a comma-
separated list of patterns. The body will be executed if any
one of those patterns is matched.

This patch replaces `CatchStmt` with `CaseStmt` as the children
of `DoCatchStmt` in the AST. This necessitates a number of changes
throughout the compiler, including:
- Parser & libsyntax support for the new syntax and AST structure
- Typechecking of multi-pattern catches, including those which
  contain bindings.
- SILGen support
- Code completion updates
- Profiler updates
- Name lookup changes
2020-04-04 09:28:26 -07:00
Xi Ge
2119851d71 Merge pull request #30804 from nkcsgexi/60786484
swift-api-checker.py: add -swift-only flag when checking ABI stability
2020-04-03 18:15:15 -07:00
Xi Ge
e937184b99 swift-api-checker.py: add framework search path for XCTest 2020-04-03 16:32:00 -07:00
Xi Ge
419b14772c swift-api-checker.py: add -swift-only flag when checking ABI stability
The existing logic of ABI checking only works for Swift symbols. We need to
add this flag so the script can work with Swift overlays.

rdar://60786484
2020-04-03 16:24:05 -07:00