Commit Graph

34 Commits

Author SHA1 Message Date
Mishal Shah
c5ff1f2cac Update master to build with Xcode 9 beta 1, OS X 10.13, iOS 11, tvOS 11, and watchOS 4 SDKs. 2017-06-14 16:20:35 -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
Doug Gregor
cedb22a10b [CoreData] Eliminate redundant explicit requirements 2017-03-22 17:35:14 -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
Jordan Rose
2c48542f2f [SDK] Resolve unsafeBitCast warnings in the CoreData overlay (#7118)
No intended functionality change.
2017-01-27 19:35:50 -08:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
practicalswift
5bc293cc09 [gardening] Add missing licensing headers. 2016-11-28 21:40:06 +01: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
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
Jordan Rose
896fc4f648 [SDK] Rename several small overlay source files. (#4520)
...to remove the temptation to put everything in one file with the same
name as the module. This doesn't do anything for overlays that /already/
have everything in one file with the same name as the module, except for
a few easy cases; we can unpack the rest later.
2016-09-28 11:39:07 -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 Gregor
24a361b7a9 [SDK Overlays] Drop redundant "Error" from AppKit and CoreData CocoaError codes.
Fixes the rest of rdar://problem/27778189.
2016-08-17 10:49:00 -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
Joe Groff
4a34dd1526 Update CoreData overlay for id-as-Any. 2016-07-25 06:01:21 -07:00
Philippe Hausler
e0ca8fbd80 [Foundation] Keep NS Updates due to changes in SE-0086
Second pass at updates for SE-0086 feedback

<rdar://problem/26892977> Make sure NSOrderedSet keeps its NS
<rdar://problem/26880016> NSBundleResourceRequest should keep its NS
<rdar://problem/26892958> Make sure NSAttributedString keeps its NS
<rdar://problem/26653694> NSCoder.decodeTopLevelObjectForKey does not follow naming guidelines
<rdar://problem/27355801> Foundation should have a structural type for TextCheckingResult
<rdar://problem/26770611> NSExpression naming is a bit awkward in swift
<rdar://problem/26653451> NSCoder encodeDataObject is misleading
<rdar://problem/26653653> NSCoder decodeObjectOfClass is redundant
2016-07-15 09:56:21 -07:00
Doug Gregor
00bb9d1037 [SE-0112] Associate various error-code enums with their error domains in the SDK. 2016-07-13 11:15:01 -07:00
Doug Gregor
c78aa11278 [Foundation] Drop 'NS' from NSCocoaError. 2016-07-12 10:53:52 -07:00
Doug Gregor
4fd78234c4 [SE-0112] Retain the underlying NSError in NSCocoaError.
NSCocoaError was capturing only the code of a Cocoa error, making it
basically useless. Instead, capture the entire NSError, the code of
which is tracked by an nested, RawRepresentable type Code. Provide
typed accessors for the common keys in the Cocoa error domain, e.g.,
NSFilePathErrorKey, NSStringEncodingErrorKey, NSUnderlyingErrorKey,
and NSURLErrorKey, to make this type easier to use.

This is specifically an implementation of part (4) of the proposed
solution to SE-0112, which makes NSCocoaError more usable. It also
adds localizedDescription to ErrorProtocol.

However, it also introduces the infrastructure needed for importing
error enumeration types more smoothly, e.g., ErrorCodeProtocol
(underscored for now), the ~= operator for matching error codes, and
so on. In essence, NSCocoaError is the pattern that the importer will
follow.
2016-07-12 10:53:52 -07:00
Jordan Rose
47a247c41b [SDK] Backwards-deployment support for Core Data's generics. (#3154)
rdar://problem/26825103
2016-06-23 12:47:22 -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
Daniel Duan
276370b599 [stdlib] apply SE-0040 to stdlib 2016-03-11 16:01:41 -08:00
Jordan Rose
1a5f23e424 stdlib: Adjust names of hand-imported NSCocoaError/NSURLError cases. 2016-02-24 17:46:11 -08:00
Jordan Rose
6e1bf0d10d Rename @exported to @_exported for now.
At some point I want to propose a revised model for exports, but for now
just mark that support for '@exported' is still experimental and subject
to change. (Thanks, Max.)
2015-11-05 11:59:00 -08:00
Dmitri Hrybenko
6402fda0c5 stdlib: remove a bunch of dynamic initializers from the library and overlays
Swift SVN r31403
2015-08-22 04:51:39 +00:00
Jordan Rose
99768eb346 Revert "Switch overlays from using @exported to -import-underlying-module."
This reverts r29441 because it breaks the Linux build. I'll talk to Dmitri
about this tomorrow.

See rdar://problem/21254367

Swift SVN r29444
2015-06-17 05:02:21 +00:00
Jordan Rose
c8bfc87c4e Switch overlays from using @exported to -import-underlying-module.
Some day we'll close the hole for @exported in the previous commit.

Swift SVN r29441
2015-06-17 04:48:06 +00:00
Jordan Rose
ff7c3f0c6a Make overlay dependencies explicit.
-import-underlying-module deliberately avoids autolinking against that module,
since normally it's used when building the Swift half of a single binary.
For the overlays, however, that's not what we want, so add the underlying
framework explicitly.

Swift SVN r29439
2015-06-17 04:47:58 +00:00
Doug Gregor
94aafe1f33 De-underscore _MachError, _POSIXError, _NSCocoaError, _NSURLError.
Turns rdar://problem/20536610 into API, per scattered but positive API
review feedback.

Swift SVN r28756
2015-05-19 05:53:36 +00:00
Doug Gregor
bddf134a87 Factor _NSCocoaError into a struct whose values are split across frameworks.
The Cocoa error domain is comprised on error codes from Foundation,
CoreData, and AppKit. Rather than try to collect all of the error
codes into a single enum in Foundation, use a struct that conforms to
ErrorType. Part of rdar://problem/20536610.

Swift SVN r28755
2015-05-19 05:53:34 +00:00