Commit Graph

1731 Commits

Author SHA1 Message Date
Doug Gregor
576902114c Allow per-SDK SWIFT_COMPILE_FLAGS.
Swift SVN r29394
2015-06-15 23:43:36 +00:00
Doug Gregor
1ae67e338c Explicitly weak-link the Contacts framework into its overlay.
Fixes rdar://problem/21030937, which came about because CNErrorDomain
is missing availability information, so we generate a normal external
reference rather than a weak one.

Swift SVN r28824
2015-05-20 05:08:21 +00:00
Jordan Rose
de9212f821 [CMake] Make gyb sources show up in Xcode's Open Quickly.
Swift SVN r28820
2015-05-20 03:36:49 +00:00
Dmitri Hrybenko
09b6048145 CMake: rename allow-bitcode-section to embed-bitcode-section
I forgot to 'git add' everything the first time.

Swift SVN r28767
2015-05-19 08:27:16 +00:00
Dmitri Hrybenko
ea17483633 Add CMake options and #ifs to hide tvOS
Swift SVN r28752
2015-05-19 05:15:52 +00:00
Dmitri Hrybenko
bb0ab47805 Add more missing dependencies for SDK overlays
Swift SVN r28612
2015-05-15 05:26:17 +00:00
Dmitri Hrybenko
a81fe1a617 CMake: don't eliminate dependencies on SwiftPrivate
... when building the overlay separately

We required this hack previously because we were not rebuilding
SwiftPrivate as a part of the overlay.

Swift SVN r28554
2015-05-14 03:20:29 +00:00
David Farler
08eb0034db Start including LLVM bitcode sections in Swift dylibs
This ports staged changes on the Xcode 7 branch back to master.
This change requires 7A113 or greater, or 7A92k or greater.

rdar://problem/20730441

Swift SVN r28537
2015-05-13 21:58:43 +00:00
Jordan Rose
d92a039ba7 Make the CoreImage overlay (nee QuartzCore) work for both 10.11 and older OSs.
On OS X 10.10 and earlier, CoreImage is a sub-framework of QuartzCore.
Users of CoreImage use "import QuartzCore" and link against QuartzCore.

On OS X 10.11 (and in the OS X 10.11 SDK), CoreImage is a top-level
framework. Users of CoreImage use "import CoreImage" and would link against
CoreImage. Of course, QuartzCore continues to re-export CoreImage's API.

When backwards-deploying, we need to continue linking against QuartzCore,
but still need to bring in the overlay if you import CoreImage. That's
what this patch does.

rdar://problem/20196610

Swift SVN r28449
2015-05-12 01:29:37 +00:00
Slava Pestov
fd256e70e3 EmitGuaranteedSelf is always on now
NFC except for removal of flag

Swift SVN r28427
2015-05-11 18:21:37 +00:00
David Farler
8c2248a482 Don't embed LLVM bitcode into the XCTest overlay
With bitcode enabled, the XCTest overlay fails to link because
XCTest.framework itself was not built with bitcode. For now, we should
not build this overlay with bitcode. It isn't embedded in apps.

rdar://problem/20884313

Swift SVN r28355
2015-05-09 01:28:05 +00:00
David Farler
db34787208 Add an AppleInternal path to framework search paths
watchOS XCTest was temporarily moved to an AppleInternal path,
so we need to add it to the framework search path to continue to
build the watchOS overlay.

rdar://problem/20883853

Swift SVN r28353
2015-05-09 01:23:06 +00:00
David Farler
89cef8171b Add support for LLVM bitcode sections
Add the machinery for, but don't enable, adding LLVM bitcode
sections to Swift standard library and overlay dylibs.

Part of rdar://problem/20730441.

Swift SVN r28329
2015-05-08 23:14:18 +00:00
David Farler
91c64fdbb1 Stop re-exporting the Objective-C library
and link it properly. This is needed to embed LLVM bitcode sections
in the standard library and overlays. The linker doesn't support
embedded bitcode and reexport flags (among others).

rdar://problem/20750099

Swift SVN r28052
2015-05-01 22:24:14 +00:00
Justin Bogner
b0e7cbd9e0 CMake: Use the USES_TERMINAL option for tests
This allows `ninja check` to display the lit progress bar when using a
new enough cmake+ninja combination, as it does in LLVM these days.

Swift SVN r27923
2015-04-29 21:30:32 +00:00
John McCall
3546d03462 Fix the unified build with cmark. Thanks to David Farler for
pointing out where I needed to look.

Swift SVN r27829
2015-04-27 23:04:13 +00:00
David Farler
ca5876a866 swiftMarkup Library
Replace ReST-flavored documentation comments with Markdown.

rdar://problem/20180412

In addition to full Markdown support, the following extensions are
supported. These appear as lists at the top level of the comment's
"document". All of these extensions are matched without regard to
case.

Parameter Outlines
------------------

- Parameters:
  - x: ...
  - y: ...

Separate Parameters
-------------------

- parameter x: ...
- parameter y: ...

- Note:
Parameter documentation may be broken up across the entire comment,
with a mix of parameter documentation kinds - they'll be consolidated
in the end.

Returns
-------

- returns: ...

The following extensions are also list items at the top level, which
will also appear in Xcode QuickHelp as first-class citizens:

- Attention: ...
- Author: ...
- Authors: ...
- Bug: ...
- Complexity: ...
- Copyright: ...
- Date: ...
- Experiment: ...
- Important: ...
- Invariant: ...
- Note: ...
- Postcondition: ...
- Precondition: ...
- Remark: ...
- Remarks: ...
- See: ...
- Since: ...
- Todo: ...
- Version: ...
- Warning: ...

These match most of the extra fields in Doxygen, plus a few more per request.

Other changes
-------------
- Remove use of rawHTML for all markup AST nodes except for those
not representable by the Xcode QuickHelp XSLT - <h>, <hr/>, and of
course inline/block HTML itself.

- Update the doc comment RNG schema to more accurately reflect Xcode
QuickHelp.

- Clean up cmark CMake configuration.

- Rename "FullComment" to "DocComment"

- Update the Swift Standard Documentation (in a follow-up commit)

- Update SourceKit for minor changes and link against cmark
  (in a follow-up commit).

Swift SVN r27727
2015-04-26 00:07:15 +00:00
Doug Gregor
2c909b4d36 Remove Objective-C selector splitting options.
We're not going this way.

Swift SVN r27717
2015-04-25 03:59:00 +00:00
David Farler
33f9b07ff1 Enable watchOS Standard Library Builds
This change does not yet make installing the watchOS SDK mandatory,
but turns it on by default for related Xcode releases.

rdar://problem/20154542

Swift SVN r27389
2015-04-16 23:50:06 +00:00
Greg Parker
039ebc97d2 [build] Fix typo in SWIFT_SDK_*_VERSION.
Swift SVN r26937
2015-04-03 08:02:08 +00:00
Greg Parker
b855ee64d8 [build] Print Xcode and SDK build numbers during configuration.
Swift SVN r26936
2015-04-03 08:01:13 +00:00
David Farler
21bc454392 Remove unused library search path
This library search path option isn't needed yet for CMark and
is probably not in the right place. Remove it for now.

Swift SVN r26721
2015-03-30 17:46:13 +00:00
Jordan Rose
38752c2d92 [CMake] Move swift_llvm_config to SwiftSharedCMakeConfig (for SourceKit).
...and rename it to swift_common_llvm_config.

This is the function that acts like llvm_config but handles the LLVM build
being a different configuration from the Swift (or SourceKit) build, which
can be problematic for multi-configuration build schemes like Xcode.

There's also one fix here: LLVM dependencies for dylibs weren't being
properly added. (This is the "SHARED_LIBRARY" case near the bottom.)

Swift SVN r26631
2015-03-27 16:36:43 +00:00
Dmitri Hrybenko
27f0e7b46e CMake: adapt to upstream CMake changes
Swift SVN r26604
2015-03-26 22:28:15 +00:00
David Farler
654f74c4f4 Build armv7s for iOS, use architecture names in paths
Up to now we've been assuming that we have only one 32-bit target and
one 64-bit target per platform. There is a need to be able to build
armv7s for iOS, but assumptions abound in the organization of files per
architecture - tests, cmake targets, and installation.

- Build armv7s when building for iOS
- Use the actual architecture name, not blank or "/32" in all paths
  related to architecture.

Testing: Clean buildbot incremental RA tests pass (requires a test
update in SourceKit as well).

rdar://problem/20206215

Swift SVN r26600
2015-03-26 20:25:32 +00:00
Ted Kremenek
333447edcc Add 'armv7s' to SwiftSetIfArchBitness.cmake.
Swift SVN r26574
2015-03-26 01:52:42 +00:00
David Farler
b60cf1efd4 Build iOS overlays for TVOS
SDK overlays built for iOS were guarded as iOS only. These are also
available in the tvOS SDK.

rdar://problem/20278575

Swift SVN r26499
2015-03-24 21:43:55 +00:00
David Farler
b60613458b cmark Build Support
<rdar://problem/20180372>

Build cmark alongside llvm and clang.
If the clone doesn't exist, build-script-impl will clone it in the
workspace. Also update the README and update-checkout scripts.

Swift SVN r26364
2015-03-20 22:32:19 +00:00
David Farler
544ef4002d Merge tvOS and watchOS Support
- Add frontend and standard library build support for tvOS.
- Add frontend support for watchOS.

watchOS standard library builds are still disabled during SDK bring-up.

To build for TVOS, specify --tvos to build-script.
To build for watchOS, specify --watchos to build-script (not yet supported).

This patch does not include turning on full tests for TVOS or watchOS, and
will be included in a follow-up patch.

Swift SVN r26278
2015-03-18 21:35:07 +00:00
Erik Eckstein
5526a938e0 cmake: _compile_swift_files now accepts multiple output files.
Swift SVN r26257
2015-03-18 09:58:05 +00:00
Jason Molenda
ee602ff4d2 Roll back r26203.
Swift SVN r26207
2015-03-17 00:54:25 +00:00
Jason Molenda
85bb13a770 Recognize armv7s and armv7k as 32-bit cpu types.
Swift SVN r26203
2015-03-17 00:28:17 +00:00
Erik Eckstein
5e6ec85b4c CMake: Support compiling without -wmo and allow explicit specification of module name.
Swift SVN r25979
2015-03-11 11:53:30 +00:00
Dmitri Hrybenko
af5cda1601 cmake: allow installing a copy of Swift dylibs into an additional directory
rdar://20080564

Swift SVN r25971
2015-03-11 05:46:07 +00:00
Dmitri Hrybenko
89d1d924bd CMake: unbreak the build on Linux after stdlib reorganization
Runtime should use LINK_LIBRARIES to link to ICU, since it is a static
archive, and we need this link dependency to be propagated to the
libswiftSwiftCore library.  I have no idea why it linked correctly
worked before.

Swift SVN r25881
2015-03-09 10:09:36 +00:00
Dmitri Hrybenko
350248dae5 Reorganize the directory structure under 'stdlib'
The standard library has grown significantly, and we need a new
directory structure that clearly reflects the role of the APIs, and
allows future growth.

See stdlib/{public,internal,private}/README.txt for more information.

Swift SVN r25876
2015-03-09 05:26:05 +00:00
Dmitri Hrybenko
71424c49bb cmake: unbreak the usecase of cross-compiling the compiler while
disabling the standard library

In almost all cases, CMake will happily operate on undefined variables,
treating them as empty, but for some reason list(REMOVE_ITEM) is an
exception.

Swift SVN r25835
2015-03-07 04:18:53 +00:00
Michael Gottesman
e16a050c8a [+0 self] Add a cmake flag to enable guaranteed self.
The reason why this is necessary is that I need to update parts of the runtime
for +0 self. I am going to use a -D flag to do this implying I need the build
system's help. Since I already have the flag I am also going to wire up the
emission of +0 self code from the compiler to be triggered off this as well.

It is of course disabled by default.

<rdar://problem/20080934>

Swift SVN r25833
2015-03-07 03:23:12 +00:00
Graham Batty
dd92de792f Use ICU to implement basic string functions.
Swift SVN r25803
2015-03-06 19:15:34 +00:00
Dmitri Hrybenko
bc5bd454bd cmake: fix the separate SDK overlay build
rdar://20051956

Swift SVN r25791
2015-03-05 23:13:56 +00:00
Graham Batty
d95d458634 Make SwiftUnstable build on linux.
Also in this is switching to using sysconf instead of sysctlbyname
to determine hardware concurrency, since it's more portable and
also works on OSX/iOS.

Swift SVN r25782
2015-03-05 16:35:17 +00:00
Michael Gottesman
3ffe8eca7c Search for dtrace in SwiftHandleDTraceSources.cmake instead of the root CMakeLists.txt.
Swift SVN r25648
2015-03-01 00:26:00 +00:00
Greg Parker
26d80cf470 [build] Fix 16K segment alignment on iOS.
Swift SVN r25628
2015-02-28 00:30:12 +00:00
Argyrios Kyrtzidis
7262217319 [CMake] Move the KEYWORD-for-target_link_libraries workaround into SwiftSharedCMakeConfig.cmake
so SourceKit can also automatically use it.

Thanks to Dmitri for the tip!

Swift SVN r25527
2015-02-25 02:53:34 +00:00
Dmitri Hrybenko
fe5d88ad20 CMake: prevent LLVM's CMake files from overriding Swift's assertion
configuration

rdar://19723473 rdar://19722119

Swift SVN r25413
2015-02-20 03:26:02 +00:00
Michael Gottesman
186f03346a Forgot to include the .cmake for r25264.
Swift SVN r25265
2015-02-13 06:47:37 +00:00
Michael Gottesman
6ff94330ae Add SwiftRuntime dtrace provider with probes for retain, release, allocateObject, deallocateObject.
Now if you want to get these dynamic metrics from the runtime all you
need to do is:

1. Configure Swift with -DSWIFT_RUNTIME_ENABLE_DTRACE=YES
2. Run your routine with the command:

sudo dtrace -s ./utils/runtime_statistics.d -c "$MY_COMMAND_LINE"

After your app finishes running, it will dump out the counts. This is a
much more efficient and low maintenance way to get such statistics than
custom instrumenting the code.

Nothing is changed if -DSWIFT_RUNTIME_ENABLE_DTRACE is not set.

Swift SVN r25264
2015-02-13 06:42:37 +00:00
Greg Parker
6aa98d9c10 [build] Fix __TEXT,__info_plist and -Wl,-application_extension settings.
Swift SVN r25160
2015-02-11 02:58:57 +00:00
Dmitri Hrybenko
6058d291ca CMake: allow the SDK overlay to be built separately from the compiler
and the stdandard library

rdar://19703353

Swift SVN r25139
2015-02-10 21:57:03 +00:00
John McCall
2ff77a9cd1 Only import *Ref typedefs as CF types if they have a bridging
attribute or appear in a whitelist.

The initial whitelist is based on an audit I performed of our current
public SDKs.  If there are CF types which appear only in our internal
SDKs, and somebody urgently needs to use them from Swift, they can
adopt the bridging attributes.  The goal is to eventually eliminate
the whitelist and rely solely on bridging attributes anyway.

Sadly, CoreCooling was not included in my SDK audit and must be
explicitly annotated. :(

I've left the main database organized by framework, but I wanted
a quasi-lexicographically sorted version to permit efficient lookup.
We generate that copy automatically with gyb.  I ended up having
to tweak handle_gyb_sources to allow it to drop the result in
CMAKE_CURRENT_BINARY_DIR instead of CMAKE_CURRENT_BINARY_DIR/{4,8}
if an architecture is not provided.  I think this is abstractly
reasonable for generated includes, which have independent ability
to detect the target word size.  But just between you and me,
I did it because I couldn't figure out how to add
"-I${CMAKE_CURRENT_BINARY_DIR/{4,8}" as a compile flag;
the obvious thing didn't work.  Anyway, I'd appreciate it if
someone double-checked my cmake hackery here.

Swift SVN r24850
2015-01-30 18:39:07 +00:00