Commit Graph

169 Commits

Author SHA1 Message Date
Doug Gregor
da60535ced [Driver / API Notes] Re-introduce "-apinotes" driver flag to compile API notes.
Using Clang to compile API notes introduces a dependency on the
underlying Clang, which can cause problems as Clang's support for API
notes evolves. Re-introduce the "-apinotes" driver flag into the Swift
driver to allow us to compile API notes, and use that (rather than
Clang) to precompile API notes for the overlays.
2016-03-04 14:12:15 -08:00
Michael Gottesman
11c8a7c674 [cmake] Add support for specifying the number of parallel link jobs for swift.
I am going to use the link job for limiting swift lto compile time.

The reason not to use the same variables as LLVM (i.e. LLVM_PARALLEL_LINK_JOBS)
is that Swift since it is compiling more IR may have a larger memory
representation implying less parallel linking jobs than LLVM can be used on
bots.
2016-03-01 16:33:53 -08:00
Michael Gottesman
5c3513657a When compiling with lto enabled, use -gline-tables-only instead of -g when debugging is enabled.
-g uses too much memory. -g-line-stables at least lets you get stack traces,
etc.

This is also what clang does IIRC.
2016-02-29 19:51:12 -08:00
Roman Levenstein
cc224e1408 Modify a CMake rule: executables generated by Swift depend on swiftSwiftOnoneSupport.
This makes sure that such executables are only built after swiftSwiftOnoneSupport is built.
2016-02-29 18:35:18 -08:00
Michael Gottesman
96d1864a38 [cmake] Fix some errors in the cmake code that enables LTO.
When I originally committed the LTO code, I tried to match the coding style of
the code right above it that enabled code coverage. Turns out that the code
coverage code did not have a weird coding style and instead just had a bug.

I fixed both of the issues and also enabled the LTO flag on non-Darwin.
2016-02-29 13:04:49 -08:00
Michael Gottesman
644005dd5f [cmake] Remove the code needed to support USR dtrace probes. We do not use them anymore. 2016-02-26 15:55:41 -08:00
Mishal Awadah
0448b73e8c [cmake] Remove debug message. 2016-02-25 18:48:11 -08:00
mawadah
9494681745 [cmake] Allow Swift libraries to individually build for specific
deployment targets.
2016-02-25 16:54:43 -08:00
practicalswift
1647e018c2 [gardening] Fix recently introduced typo: "optmized" → "optimized" 2016-02-25 22:17:27 +01:00
Roman Levenstein
8dff92ad4d Move pre-specializations of popular types away from the standard library.
Pre-specializations were only used by Onone builds, but were kept inside the standard library dylyb anyways. This commit moves all the pre-specializations into a dedicated Swift module and a dynamic library, which are only used by Onone builds.

This reduces the code size of libswiftCore.dylib by 4%-5%.
2016-02-25 11:23:15 -08:00
Todd Fiala
ceb58eac1e Merge branch 'master' of ssh://github.com/apple/swift 2016-02-22 22:00:10 -08:00
Todd Fiala
efc6cc3e2a Revert "Most swift targets should depend on SwiftOnoneSupport, except Core and SwiftOnoneSupport"
This reverts commit a374d1b0fa.
2016-02-22 21:19:32 -08:00
Xi Ge
dd74e1c0ef [Serialization] Add a new front-end argument to specify the path of the group info file. NFC 2016-02-22 20:28:39 -08:00
Roman Levenstein
a374d1b0fa Most swift targets should depend on SwiftOnoneSupport, except Core and SwiftOnoneSupport 2016-02-22 19:29:22 -08:00
Han Sangjin
e06c7136cb Porting to Cygwin. rebased and squashed 2016-02-22 13:20:21 +09:00
Michael Gottesman
e3548ddaf6 [cmake] Add an option to compile the compiler with -flto.
This doesn't hit the runtime. I am going to try that in a little bit.

I saw some nice reductions in compile time in the SILOptimizer in the stdlib.
Specifically, we went from spending ~33 seconds in the siloptimizer -> ~23
seconds. There were other improvements as well.

Keep in mind, I have not tested this with debug info, so it may hog all of your
ram due to crazy amounts of debug info. It would be good to try and do what LLVM
does which is to compile with line tables but not full types.

rdar://24717107
2016-02-18 02:15:16 -08:00
William Dillon
d0d9b1de5a Discard swift.ld and support gold linker 2016-02-17 17:47:35 -08:00
Saleem Abdulrasool
8454cdbe55 Use the new LLVM cmake paths
Update the paths that we look in for the cmake modules from LLVM which changed
recently on SVN trunk.  Check the old paths first, and if that fails, check the
new path.  This permits building against either layout.
2016-02-16 15:15:10 -08:00
Luke Larson
d4ece4b4d0 [benchmark] Correctly depend on stdlib targets 2016-02-15 17:22:07 -08:00
David Farler
e6b15b6027 Consistently use list(APPEND for adding linker arguments
The Xlinker flags were getting globbed into a single string since
we started adding current/compatibility version arguments to the
linker.

rdar://problem/24622276
2016-02-12 13:54:07 -08:00
Jordan Rose
ba24407c65 [CMake] Fix build when SWIFT_STDLIB_ENABLE_RESILIENCE is off.
*Shatner voice* CMaaaaaaaaaake!
2016-02-10 10:37:05 -08:00
Jordan Rose
a4a4a80ac4 [CMake] Don't pass -sil-serialize-all under SWIFT_STDLIB_ENABLE_RESILIENCE.
Thanks, Slava!
2016-02-10 10:29:01 -08:00
Jordan Rose
6012485a24 [CMake] Remove old experimental option SWIFT_STDLIB_USE_ASSERT_CONFIG_RELEASE.
This is now controlled by SWIFT_STDLIB_ASSERTIONS.
2016-02-09 16:32:45 -08:00
Jordan Rose
1b8caf5998 [CMake] Add an option to compile the stdlib resiliently.
The short-term goal here is to get everything compiling and all the tests
passing.
The mid-term goal is to test the performance of a resilient stdlib.
The long-term goal is to make this the default (and only) build mode.

This should be considered EXPERIMENTAL; we can't even build libSwiftCore
successfully yet.
2016-02-09 16:32:45 -08:00
Dmitri Gribenko
b728b89b9d Merge pull request #1126 from harlanhaskins/profdata-merge
[coverage] Automatic merger for LLVM profile data
2016-02-03 11:02:47 -08:00
William Dillon
ab7c87e7e8 Implemented ARMv6 and fixed up ARMv7 2016-01-29 21:41:22 +00:00
Harlan Haskins
9fccf5058a [coverage] Fixed conflicts with master 2016-01-28 10:05:38 -08:00
Dmitri Gribenko
aeeb9c1325 Move collection testing code from StdlibUnittest to a new library
This brings down StdlibUnittest build time to 90 seconds with either
a DebugAssert or a ReleaseAssert compiler.

The new library, StdlibCollectionTests, is only built when running
validation tests.
2016-01-26 18:58:03 -08:00
Harlan Haskins
c6c0b3d5d0 [coverage] Removed explicit swift-%p.profraw arguments from CMake commands, because we're using LLVM's environment variables 2016-01-25 19:49:03 -08:00
Ben Langmuir
1ad89fb8a7 [CMake] Always use @rpath for XCTest
rdar://problem/23942371
2016-01-25 18:14:47 -08:00
Joe Groff
c62274c3b6 Link Swift images on ELF using -Bsymbolic.
We don't want references to local symbols within an image to be relocatable, since this increases startup time and causes problems with relative references.
2016-01-20 14:41:53 -08:00
David Farler
401666421d Properly set dylib versions on Darwin for production builds
This passes -current_version and -compatibility_version to the
Darwin linker when SWIFT_COMPILER_VERSION is set.

rdar://problem/23434683
2016-01-20 13:22:43 -08:00
Dmitri Gribenko
a74355426e Merge pull request #1008 from modocache/build-script-sil-verify-all
[build-script] Unify naming: `SIL_VERIFY_ALL`
2016-01-20 00:40:15 -08:00
Luke Larson
ba619a9ff2 [CMake] Support code coverage analysis 2016-01-19 18:51:07 -08:00
Brian Gesiak
cad395bf3b [build-script] Unify naming: SWIFT_SIL_VERIFY_ALL
Although the user sets the option using `--sil-verify-all`, various
build scripts refer to the option as `SWIFT_VERIFY_ALL`. Code comments
indicate that this may have been a separate setting at one time.

Remove the misleading comments and unify naming with
`--sil-verify-all` and `SWIFT_SIL_VERIFY_ALL`. This more closely matches what
the option actually does (adds `-Xfrontend -sil-verify-all` to `swiftc`
invocations during the build process).
2016-01-19 11:11:39 -05:00
Dmitri Gribenko
5a1f8b25a5 Merge pull request #979 from antonblanchard/powerpc64_merge
Add powerpc64le Linux support
2016-01-15 18:14:45 -08:00
David Farler
4377eb8d62 Merge pull request #453 from timbodeit/use_internal_sdk-remove-leftovers
[AddSwift.cmake] Remove leftover use_internal_sdk parameter values
2016-01-15 11:26:50 -08:00
Anton Blanchard
b1827d8a8f Add powerpc64le Linux support
This patch adds powerpc64le Linux support. While the patch also adds
the matching powerpc64 bits, there are endian issues that need to be
sorted out.

The PowerPC LLVM changes for the swift ABI (eg returning three element
non-homogeneous aggregates) are still in the works, but a simple LLVM
fix to allow those aggregates results in swift passing all but 8
test cases.
2016-01-15 06:48:31 +00:00
Luke Larson
9f2105b36e [CMake] Globally track produced libraries per platform
rdar://problem/23955856
2016-01-12 18:36:36 -08:00
Michael Gottesman
6da11cec7b Make sure that even in the standalone build configuration, we can build doxygen documentation.
The issue is that this was originally done when in-tree builds were the
preferred way of building so LLVM_ENABLE_DOXYGEN would be defined and LLVM would
have found doxygen as well. When one is doing the current preferred standalone
install, the option LLVM_ENABLE_DOXYGEN is not discoverable to the user via an
option with a default argument and the doxygen package is never searched for.

This commit ensures that when building standalone:

1. LLVM_ENABLE_DOXYGEN is defined as an option with a default value of FALSE.
2. The cmake dtrace package is searched for and found.

When we are building standalone, we take these values from LLVM.
2016-01-09 21:10:45 -08:00
Davide Italiano
c3292dba02 [CMake] Pass -lpthread on FreeBSD.
At the time this code was originally written, Swift standard
library hasn't been ported to FreeBSD, so we didn't need any
additional library. This is not true anymore, so fix it.
2016-01-08 22:26:47 +00:00
Tim Bodeit
b0185ccb6d [AddSwift.cmake] Remove leftover use_internal_sdk parameter values
The `use_internal_sdk` flag has been removed from `_add_variant_link_flags` and
`_add_variant_c_compile_flags` in commit
d9bbb6caf0

In four instances where previously FALSE was given as the value for that
parameter, this value has not been removed from the call.
This causes the two functions to try to append flags to FALSE instead of the
respective link_flags and c_compile_flags variables.
2016-01-06 18:29:36 +01:00
Ryan Lovelett
dd342bbb84 Remove unused method add_swift_llvm_loadable_module
This function was discovered to be unused during the review of #435. It
was requested that it be removed as a subsequent pull.
2015-12-22 20:20:12 -05:00
Dmitri Gribenko
83751888c7 Start porting Swift to Linux on aarch64 (arm64)
Hello world works, a non-trivial part of the testsuite passes.
2015-12-13 17:05:42 -07:00
Dmitri Gribenko
67da5b6483 Merge pull request #480 from dcci/coalesce
Coalesce protocol conformance sections on FreeBSD.
2015-12-13 03:30:13 -08:00
Davide Italiano
10ee8ba877 Update AddSwift.cmake 2015-12-13 06:25:51 -05:00
Davide Italiano
c97d1753d5 Coalesce protocol conformance sections on FreeBSD. 2015-12-13 11:27:06 +00:00
Dmitri Gribenko
ba6643c7a4 CMake: allow the build to succeed when the path to Xcode contains spaces
Tests still have issues in that setup.
2015-12-11 18:56:30 -08:00
Landon Fuller
a51494a146 Add comment to clarify the empty if block, as per gribozavr's review feedback. 2015-12-04 14:02:28 -07:00
Landon Fuller
a7ec794287 Add basic build system and Driver support for FreeBSD targets/hosts. 2015-12-04 12:24:46 -07:00