Commit Graph

86 Commits

Author SHA1 Message Date
Sho Ikeda
c076316722 [gardening][Overlay] Prefer macOS over OSX for @available 2018-03-23 13:36:59 +09:00
Sho Ikeda
ff5a27a62d [overlay][gardening] Prefer os(macOS) over os(OSX) 2017-12-07 21:50:51 +09:00
Jordan Rose
1598a21e43 DI: Warn on non-delegating cross-module struct initializers
...as detected by initializing an individual field without having
initialized the whole object (via `self = value`).

This only applies in pre-Swift-5 mode because the next commit will
treat all cross-module struct initializers as delegating in Swift 5.
2017-11-09 11:24:28 -08:00
Lance Parker
414614cf88 Revert "Revert "[stdlib]Enable Swift 4 mode for the overlays (#12608)"" (#12751)
This reverts commit bcf5d66c8e.
2017-11-06 14:03:48 -08:00
Mishal Shah
bcf5d66c8e Revert "[stdlib]Enable Swift 4 mode for the overlays (#12608)"
This reverts commit f54d8b4ef2.
2017-11-03 11:52:30 -07:00
Lance Parker
f54d8b4ef2 [stdlib]Enable Swift 4 mode for the overlays (#12608)
Enable Swift 4 mode for the overlays
2017-11-03 10:11:45 -07:00
Doug Coleman
cfebb599cb overlays: Update dependencies and amend the script to add headers. 2017-05-05 15:32:24 -07:00
Arnold Schwaighofer
9fca4ccc37 Revert "Merge pull request #9057 from erg/overlay-deps-round5"
This reverts commit ea82bd19ec, reversing
changes made to ffdc8e15d9.

It broke the i386 build.
2017-04-27 07:23:08 -07:00
Doug Coleman
9a28931001 overlays: Update dependencies and amend the script to add headers. 2017-04-26 18:27:44 -07:00
Max Moiseev
42095bfbaa Merge branch 'master' into new-integer-protocols 2017-04-04 11:00:47 -07:00
Doug Coleman
7054139c60 [cmake]: Be explicit about overlay platforms for compiling standalone.
The ALL_APPLE_PLATFORMS idiom is wrong because any new platforms that
get added will not have dependencies by default and it's breaking the
standalone overlay script for platforms that use it. Moreover, some of the
overlays list all platforms even though they could have used
ALL_APPLE_PLATFORMS.
2017-04-03 21:00:05 -07:00
Max Moiseev
10f0c9e89a Merge branch 'master' into new-integer-protocols 2017-04-03 11:49:56 -07:00
practicalswift
ca72b12287 [gardening] Remove accidental \t:s 2017-04-02 16:03:54 +02:00
Doug Gregor
e5267f5d13 [SceneKit] Address deprecated @objc inference warnings. 2017-03-31 21:53:57 -07:00
Max Moiseev
b9fb3badc8 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-03-22 12:30:24 -07:00
Doug Coleman
8c2bd5ae23 cmake: Initial standalone overlays builds.
./utils/build-overlay AVFoundation OSX macosx
rdar://problem/28707246
2017-03-14 12:51:42 -07:00
Michael Gottesman
8437819b5a [CMake] Revert recent changes.
These changes caused a number of issues:

1. No debug info is emitted when a release-debug info compiler is built.
2. OS X deployment target specification is broken.
3. Swift options were broken without any attempt any recreating that
functionality. The specific option in question is --force-optimized-typechecker.

Such refactorings should be done in a fashion that does not break existing
users and use cases.

This reverts commit e6ce2ff388.
This reverts commit e8645f3750.
This reverts commit 89b038ea7e.
This reverts commit 497cac64d9.
This reverts commit 953ad094da.
This reverts commit e096d1c033.

rdar://30549345
2017-02-15 22:26:06 -08:00
Chris Bieneman
e096d1c033 [CMake] Simplify add_swift_library
This patch splits add_swift_library into two functions one which handles
the simple case of adding a library that is part of the compiler being
built and the second handling the more complicated case of "target"
libraries, which may need to build for one or more targets.

The new add_swift_library is built using llvm_add_library, which re-uses
LLVM's CMake modules. In adapting to use LLVM's modules some of
add_swift_library's named parameters have been removed and
LINK_LIBRARIES has changed to LINK_LIBS, and LLVM_LINK_COMPONENTS
changed to LINK_COMPONENTS.

This patch also cleans up libswiftBasic's handling of UUID library and
headers, and how it interfaces with gyb sources.

add_swift_library also no longer has the FILE_DEPENDS parameter, which
doesn't matter because llvm_add_library's DEPENDS parameter has the same
behavior.
2017-02-14 14:28:10 -08:00
Max Moiseev
27889c6376 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-01-06 15:54:44 -08:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Max Moiseev
70b2343626 Merge branch 'master' into new-integer-protocols 2016-11-28 15:25:01 -08:00
Saleem Abdulrasool
f238d65a33 stdlib: use ALL_APPLE_PLATFORMS where applicable
Convert a few instances of fully listing all apple platforms with the special
`ALL_APPLE_PLATFORMS` value for `TARGET_SDKS`.
2016-11-27 14:33:06 -08:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Max Moiseev
953d919a22 Merge branch 'master' into new-integer-protocols 2016-11-16 14:46:31 -08:00
Doug Coleman
692bc1c031 cmake: Allow requiring minimum versions using sdk-os-version triples on
Darwin.

Example:
--darwin-sdk-deployment-targets=fookit-ios-8.0;barkit-tvos-9.2
2016-11-15 16:43:37 -08:00
Max Moiseev
8912dc09a8 Merge branch 'master' into new-integer-protocols 2016-10-20 13:55:03 -07:00
Jordan Rose
c97451f851 [SDK] Use existing NS_REFINED_FOR_SWIFT to remove _silgen_name from SceneKit. 2016-10-15 14:59:28 -07:00
Max Moiseev
17b3e38497 Merge branch 'master' into new-integer-protocols 2016-09-30 15:14:55 -07:00
Jordan Rose
b3a9ce60ef Add manual dependencies not found by find-overlay-dependencies.sh.
rdar://problem/28543423
2016-09-29 11:34:51 -07:00
Doug Coleman
2747d1eed8 Overlays: Fix tool not to find os as a dependency unless it depends on
os/activity.h or os/log.h. Update cmake files again, hardcoding a Darwin
dependency. The script does not notice that Foundation depends on
CoreGraphics, so add that manually.

Also found that MapKit is supported on WATCHOS but we didn't have dependencies
for that.

Favor one line per supported SDK instead of catch-all dependency lines.

Distinguish from SDKs which have no dependencies vs SDKs which are
unsupported on a particular platform by printing `unsupported` to the
console and remove the line in the cmake file because it should
not exist anyway.

This full cleanup was not done before because of circularity detected by the
util, which has since been fixed.

Support directories with spaces.
2016-09-28 10:28:02 -07:00
Doug Coleman
6c6f30b6af Overlays: The dependencies right now are approximate, and when new overlays are
added the build breaks. There's already a tool to get proper
dependencies, `utils/find-overlay-dependencies.sh`, so this patch
allows that tool to update the `CMakeLists.txt` files in-place.

Also it adds a line to the `CMakeLists.txt` files for each SDK so that the tool works.
2016-09-26 12:23:47 -07:00
Max Moiseev
6803cda05c Merge branch 'master' into new-integer-protocols 2016-09-26 11:39:46 -07:00
Joe Groff
86fbeee285 SE-0139: Bridge Cocoa framework structs to NSValue.
For every struct type for which the frameworks provides an NSValue category for boxing and unboxing values of that type, provide an _ObjectiveCBridgeable conformance in the Swift overlay that bridges that struct to NSValue, allowing the structs to be used naturally with id-as-Any APIs and Cocoa container classes. This is mostly a matter of gyb-ing out boilerplate using `NSValue.init(bytes:objCType:)` to construct the instance, `NSValue.objCType` to check its type when casting, and `NSValue.getValue(_:)` to extract the unboxed value, though there are a number of special snowflake cases that need special accommodation:

- To maintain proper layering, CoreGraphics structs need to be bridged in the Foundation overlay.
- AVFoundation provides the NSValue boxing categories for structs owned by CoreMedia, but it does so using its own internal subclasses of NSValue, and these subclasses do not interop properly with the standard `NSValue` subclasses instantiated by Foundation. To do the right thing, we therefore have to let AVFoundation provide the bridging implementation for the CoreMedia types, and we have to use its category methods to do so.
- SceneKit provides NSValue categories to box and unbox SCNVector3, SCNVector4, and SCNMatrix4; however, the methods it provides do so in an unusual way. SCNVector3 and SCNVector4 are packaged into `CGRect`s and then the CGRect is boxed using `valueWithCGRect:`. SCNMatrix4 is copied into a CATransform3D, which is then boxed using `valueWithCATransform3D:` from CoreAnimation. To be consistent with what SceneKit does, use its category methods for these types as well, and when casting, check the type against the type encoding SceneKit uses rather than the type encoding of the expected type.
2016-09-21 19:26:10 -07:00
Max Moiseev
ea8e0f0e15 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2016-09-21 14:48:35 -07:00
Michael Gottesman
06a70d3942 [cmake] Add cmake support for only applying tsan to the swift stdlib/runtime. 2016-08-03 17:53:57 -07:00
Dave Abrahams
f06a9a1154 Merge 'origin/master' into new-integer-protocols 2016-07-29 17:52:49 -07:00
Rintaro Ishizaki
06603c10bc [SE-0101] .size to .stride 2016-07-30 03:11:46 +09:00
Rintaro Ishizaki
091506315b [SE-0101] Implement: Reconfiguring sizeof and related functions into MemoryLayout struct
As of now:

* old APIs are just marked as `deprecated` not `unavaiable`. To make it
  easier to co-operate with other toolchain repos.
* Value variant of API is implemented as public @private
  `_ofInstance(_:)`.
2016-07-30 03:09:28 +09:00
Maxim Moiseev
e2e032bc20 core and overlays build 2016-07-29 13:31:21 +03:00
Andrew Trick
0b75ee975e Remove "illegal" UnsafePointer casts from the stdlib.
Update for SE-0107: UnsafeRawPointer

This adds a "mutating" initialize to UnsafePointer to make
Immutable -> Mutable conversions explicit.

These are quick fixes to stdlib, overlays, and test cases that are necessary
in order to remove arbitrary UnsafePointer conversions.

Many cases can be expressed better up by reworking the surrounding
code, but we first need a working starting point.
2016-07-28 20:42:23 -07:00
Joe Groff
00ad6f7478 Update SceneKit overlay for id-as-Any. 2016-07-25 06:01:21 -07:00
Luke Larson
74e0498015 Revert "Update master to build with Xcode 8 beta 3, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs."
This reverts commit 62d1fa760c.
2016-07-19 15:18:17 -07:00
Mishal Shah
62d1fa760c Update master to build with Xcode 8 beta 3, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs. 2016-07-19 22:31:34 +02:00
Saleem Abdulrasool
e582465b0e stdlib: use the modern spellings for nullability
Use the portable spelling for the nullability keywords (_Nullable, _Nonnullable,
_Null_unspecified) rather than the old spelling (__nullable, __nonnullable,
__null_unspecified).  NFC.
2016-07-18 12:23:41 -07:00
Michael Ilseman
cd9b480103 [SceneKit] Add apinotes to swift_private some decls
These apinotes will swift_private many of the bounding box methods,
and adjust the overlays appropriately. Those APIs have better
alternatives provided by the overlays, and thus shouldln't be exposed.
2016-07-08 14:37:16 -07:00
Brian Gesiak
328de9e280 [SR-1738] add_swift_library takes SHARED/STATIC arg
As a first step to allowing the build script to build *only*
static library versions of the stdlib, change `add_swift_library`
such that callers must pass in `SHARED`, `STATIC`, or `OBJECT_LIBRARY`.

Ideally, only these flags would be used to determine whether to
build shared, static, or object libraries, but that is not currently
the case -- `add_swift_library` also checks whether the library
`IS_STDLIB` before performing certain additional actions. This will be
cleaned up in a future commit.
2016-06-16 13:15:58 -04:00
Mishal Shah
87b7bcfd3e Update master to build with Xcode 8 beta 1, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs. 2016-06-14 14:53:55 -07:00
Doug Gregor
2807a17eb8 [Type checker SR-899] Warning on missing ".self" for single-parameter functions.
Due to a modeling error in the type checker's folding of type
references into type expressions, code such as "strideof(Int)" would
be accepted without the required ".self". Commit
4a60b6cbf4 fixes the modeling issue but
left the historical accepts-invalid; now, diagnose these cases with a
warning + Fix-It to ease the transition.

Fixes SR-899.
2016-06-12 22:31:59 -07:00
Dmitri Gribenko
d591f9cf7a stdlib: remove most uses of @warn_unused_result, which does nothing now
I kept the one on sorted(), because that one requires a less trivial
change.
2016-05-19 18:39:39 -07:00
Dmitri Gribenko
ff49e17eb2 Remove dead code 2016-05-11 11:47:03 -07:00