Commit Graph

27 Commits

Author SHA1 Message Date
Max Moiseev
bba4d9eada [overlay] Add mising dependencies to WatchKit overlay
Fixes: <rdar://problem/32776189>
2017-06-14 15:38:49 -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 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
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 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
Jordan Rose
ba2f720e81 [CMake] More dependency updates. (#4962)
Things that depend on MapKit and QuartzCore also need to be updated.
2016-09-23 10:31:15 -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
Jordan Rose
4b0b325358 [CMake] Add missing SDK overlay dependencies. (#3799)
...plus the hacked-up tool I used to find them.
2016-07-27 16:10:24 -07:00
Doug Gregor
71882c6516 [API Notes] Use API notes rather than overlays to make error enums bridge.
The Clang attribute allows one to state that a particular enumeration
type describes an error, and associates it with a particular domain
constant. However, due to lack of API notes support, this attribute
wasn't actually getting used. Instead, we had a number of explicit
extensions to enum types to make them conform to the _BridgedNSError
protocol explicitly.

Now that we have API notes, use them to make these enums into error
enums with the appropriate domain, so that the Clang importer will
synthesize the _BridgedNSError conformances. Then, remove all of the
explicit conformances---and with them, the overlays for 12 frameworks.

There is a small fix to more eagerly consider these conformances as
"used" if an expression is formed with the error enum as a value
type. This better ensures that the conformances will be available at
runtime when needed.

This cleanup is needed to implement SE-0112 (NSError bridging),
although it is useful by itself.
2016-07-06 09:54:59 -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
Roman Levenstein
0c1c5d6086 Revert "Add a missing SceneKit dependency to WatchKit"
This reverts commit 6ef2f82225.
It was a wrong fix for the build failures.
2016-05-18 17:16:22 -07:00
Roman Levenstein
6ef2f82225 Add a missing SceneKit dependency to WatchKit 2016-05-18 17:08:55 -07:00
David Farler
da670c5a34 libswiftWatchKit depends on libswiftCoreLocation
<rdar://problem/21885844>

Swift SVN r30373
2015-07-18 06:55:13 +00:00
Devin Coughlin
cb85eac07e WatchKit Overlay: Remove temporary hack to disable availability checking
Remove a temporary hack added in r29026 that disabled availability checking
for the WatchKit overlay due to SDK update issues. It is no longer needed.

rdar://problem/21099550

Swift SVN r29652
2015-06-25 01:56:58 +00:00
Doug Gregor
57ee3c68a1 watchOS: Disable autolinking against CoreText in PassKit/UIKit/WatchKit overlays.
Addresses a bitcode linking problem when linking with the SDK overlays,
which are built against the internal SDK, against a program built
against the public SDK, which does not have
CoreText. rdar://problem/21246363

Swift SVN r29395
2015-06-15 23:43:37 +00:00
Devin Coughlin
d6b3a2d75e WatchKit Overlay: Add availability and temporarily disable availability checking
The <Redacted>13A261 iOS SDK adds an availability attribute marking the imported
WatchKitErrorCode enum as available only on iOS 8.2 and newer. The WatchKit overlay
has a protocol extension for WatchKitErrorCode, so mark the extension as only available
on 8.2 and newer. On <Redacted>13A261 this silences a diagnostic complaining that
WatchKitErrorCode is only available on 8.2 and newer.

However, on <Redacted>13A254 this new annotation itself causes an error because on that
SDK WatchKitErrorCode claims to be available on all iOS versions and yet the conformance
would only hold on 8.2 and newer. To make this second diagnostic go away, this
commit temporarily disables availability checking for the WatchKit overlay.
rdar://problem/21099550 tracks re-enabling availability checking when we update the bots,
etc. to <Redacted>13A261.

rdar://problem/21098396

Swift SVN r29026
2015-05-26 05:47:56 +00:00
Doug Gregor
077f3d3a36 WatchKit needs to be weak-linked due to missing availability info in the headers.
Swift SVN r28830
2015-05-20 17:25:08 +00:00
Dmitri Hrybenko
a2096f187c Add the WatchKit overlay
rdar://20438380

Swift SVN r28654
2015-05-16 00:32:42 +00:00
Dmitri Hrybenko
7500da41c7 WatchKit depends on UIKit and CoreGraphics
Swift SVN r28608
2015-05-15 03:59:48 +00:00
Doug Gregor
3561cfc8bd Bridge 15 NSError error domains into their corresponding enums.
Introduce a number of small overlays to bridge the NSError domains for
a number of frameworks into existing imported enums. This batch only
covers cases where there is an existing NS_ENUM describing the codes
for the domain, so we need only extend that enum to provide the
appropriate _BridgedNSError conformance.

This is the bulk of rdar://problem/20536610.

Swift SVN r28585
2015-05-14 22:34:29 +00:00