Commit Graph

193 Commits

Author SHA1 Message Date
Michael Gottesman
71c591b86e [lto] When determining the number of lto threads to use, take the minimum of ${BUILD_JOBS} and a heuristic that scales with the memory size of the machine.
This ensures that even if we have a machine with a huge amount of ram, we
respect ${BUILD_JOBS}.
2016-03-09 13:31:35 -08:00
Jason Molenda
1f31fff611 Allow swift to be built for iphoneos-armv7s, a variation on armv7,
used with the Apple A6 and later 32-bit devices.
2016-03-08 16:49:31 -08:00
Brian Gesiak
b7973a99e5 Merge pull request #1556 from modocache/build-script-xctest-on-foundation
[build-script] Build Foundation before XCTest [AsyncXCTest 4/6]
2016-03-08 10:57:52 -05:00
Brian Gesiak
453f8e6626 [build-script] Build Foundation before XCTest
https://github.com/apple/swift-corelibs-xctest/pull/43 introduces
a dependency between XCTest and Foundation. Modify the build script
in order to properly build all products:

- Build Foundation before XCTest, then link Foundation when building
  XCTest by using new '--foundation-build-dir' option.
- Link Foundation when testing SwiftPM by using new '--foundation'
  option.
- On Linux, ensure Foundation is built when XCTest is.
2016-03-06 01:12:15 -05:00
Brian Gesiak
612d6aca0e [build-script] Remove obsolete PM --build-tests
The `swiftpm/Utilities/bootstrap --build-tests` parameter was deprecated in ae9121960e and is no longer used. Remove it to reduce confusion.
2016-03-04 23:42:32 -08:00
Dmitri Gribenko
80db9fb1f3 Merge pull request #1506 from modocache/build-script-xctest-fixmes
[build-script] Only build XCTest once
2016-03-04 21:51:55 -08:00
Brian Gesiak
73cccadd3e Merge pull request #1396 from modocache/build-script-host-test
[SR-237] Move SKIP_TEST_* arguments to Python
2016-03-03 00:02:36 -08:00
Brian Gesiak
729e54f347 [build-script] Only build XCTest once
Prior to https://github.com/apple/swift-corelibs-xctest/pull/57 and
https://github.com/apple/swift-corelibs-xctest/pull/58, the
swift-corelibs-xctest build script did not provide a way an already
built XCTest.so to be tested or installed. As a result, the Swift
build script would build XCTest several times.

For example, the following invocation would build XCTest three separate
times:

```
$ utils/build-script --xctest --test -- --install-xctest
```

Modifications to the XCTest build script now allow a prebuilt XCTest to
be tested (via the `build_script.py test` subcommmand) and installed
(via the `build_script.py install` subcommand). Use these in the Swift
build script to build XCTest only once, then test and install the built
version.

Also, explicitly disable XCTest installation on OS X. XCTest's
`build_script.py` only supports non-Darwin platforms, so running
`utils/build-script --xctest -- --install-xctest` on OS X used to cause
the build script to fail because of how that script invokes `swiftc`.
It now fails with an explicit error indicating `--install-xctest` is
unsupported.
2016-03-02 03:52:45 -05: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
9d85904c18 [cmake] Work around lto cmake bug in cmake 3.4.0.
http://public.kitware.com/pipermail/cmake-developers/2015-November/026993.html

We check for this in build-script-impl and if you are running such a version,
special flags are passed in to work around the issue. If you do not have this verison of cmake, this change should not affect you in any way.

This will be fixed in cmake 3.4.1.
2016-03-01 15:01:19 -08:00
Michael Gottesman
fc1735ce5d Fix thinko. 2016-02-29 20:14:11 -08:00
Michael Gottesman
d2143730c0 [lto] Add the option llvm-enable-lto that compiles LLVM/Clang with LTO.
If you also set swift-enable-lto to 1, then you get a swiftc that is compiled
fully with LTO.
2016-02-29 19:53:51 -08:00
Brian Gesiak
03fd72f713 [SR-237] Move SKIP_TEST_* arguments to Python
- Migrate `SKIP_TEST_IOS`, `SKIP_TEST_TVOS`, and `SKIP_TEST_WATCHOS` to
  Python.
- In the `build-script-impl` shellscript, only deal with
  `SKIP_TEST_*_HOST` and `SKIP_TEST_*_SIMULATOR` variables.
- Introduce a `--host-test` flag to the Python `build-script` in order
  to allow users to specify whether to run host tests. These flags
  still don't do anything.
- Fix typo: `skip-build-tvos_device` was meant to be `skip-build-tvos-device`.
2016-02-29 19:19:33 -05:00
Michael Gottesman
133f8549fa Make the ubsan build actually work. I made a careless mistake in the previous commit. This should work now. 2016-02-27 00:18:01 -08:00
Michael Gottesman
f1df90423d Add support for compiling the compiler (not the stdlib) with ubsan.
While on OS X, ubsan is not productized, on linux it is, so hopefully we can get
this setup on a bot so we can catch some undefined behavior issues.
2016-02-27 00:04:35 -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
Dmitri Gribenko
0d307d498d Merge pull request #1426 from modocache/build-script-skip-builds-tests-linux
[build-script] Skip option for non-Darwin stdlib tests
2016-02-23 22:25:00 -08:00
Dmitri Gribenko
225497dfc4 Merge pull request #1316 from modocache/build-script-impl-xctest
[build-script] Build & test XCTest (on OS X, too)
2016-02-23 22:24:12 -08:00
Brian Gesiak
213d81dcbe [build-script] Skip option for non-Darwin stdlib tests
It's possible to cross-compile for iOS while skipping stdlib tests
on OS X:

```
$ utils/build-script --ios -- --skip-test-osx
```

The same is not possible on Linux. Add options to skip builds and
tests on non-Darwin platforms: Linux, FreeBSD, and Cygwin.
2016-02-23 23:48:51 -05:00
Dave Abrahams
887c3bbe82 build-script: let distcc dictate parallelism 2016-02-22 18:57:41 -08:00
Han Sangjin
e06c7136cb Porting to Cygwin. rebased and squashed 2016-02-22 13:20:21 +09:00
Dmitri Gribenko
50e52c2890 Merge pull request #1356 from dgrove-oss/libdispatch-tweak-build-for-CI
libdispatch: also build tests during build phase
2016-02-19 08:56:12 -08:00
Brian Gesiak
ac5f7c7326 [build-script] Build & test XCTest (on OS X, too)
Allow swift-corelibs-xctest to be built and tested on Linux and OS X,
via `utils/build-script --xctest --test`.

On OS X, XCTest is built via `xcodebuild`, which has been possible since
https://github.com/apple/swift-corelibs-xctest/pull/47. It's tested via
the "SwiftXCTestFunctionalTests" Xcode target. Keep in mind that
`xcodebuild` must be configured on the host machine to use a Swift
toolchain that can build XCTest--as of
https://github.com/apple/swift-corelibs-xctest/pull/48, that would be
`swift-DEVELOPMENT-SNAPSHOT-2016-02-08` or later.

On Linux, XCTest is built and tested via the project's
`build_script.py`, which has been possible since
https://github.com/apple/swift-corelibs-xctest/pull/46.
2016-02-19 00:09:57 -05:00
Michael Gottesman
d10af7657b [build-script] Add in a build-script-impl option for -DSWIFT_ENABLE_LTO. 2016-02-18 02:18:15 -08:00
William Dillon
d0d9b1de5a Discard swift.ld and support gold linker 2016-02-17 17:47:35 -08:00
David Grove
196f8baea0 libdispatch: also build tests during build phase
A tweak to match the Swift CI pattern; build
the test cases during the build phase.
2016-02-17 21:08:54 +00:00
Dmitri Gribenko
5c59362688 Merge pull request #1267 from modocache/sr-237
[SR-237][build-script] Migrate more of build-script-impl to Python
2016-02-16 08:52:10 -08:00
Luke Larson
d4ece4b4d0 [benchmark] Correctly depend on stdlib targets 2016-02-15 17:22:07 -08:00
Brian Gesiak
120ec99be5 [build-script] Archive symbols in Python
Rather than archiving symbols at the very end of the build-script-impl
shellscript, do so at the end of the Python build-script. A small step towards
achieving SR-237.
2016-02-15 12:58:09 -05:00
Brian Gesiak
3821e6ef76 [build-script] Set TOOLCHAIN_PREFIX in Python
Rather than setting the path to the .xctoolchain in the build-script-impl
shellscript, do so in the Python build-script. A small step towards
achieving SR-237.
2016-02-15 10:48:46 -05:00
Brian Gesiak
d717f8f9d7 [build-script] Set INSTALL_PREFIX in Python
Rather than setting a default value for the INSTALL_PREFIX in the
build-script-impl shellscript, do so in the Python build-script. A small step
towards achieving SR-237.
2016-02-15 10:48:45 -05:00
Brian Gesiak
3b61ad3086 [build-script] Migrate "SHOW_SDKS" to Python
Rather than printing `xcodebuild` version information in the
build-script-impl shellscript, do so in the Python build-script. A small step
towards achieving SR-237.
2016-02-15 10:48:45 -05:00
Brian Gesiak
8012b1c4e2 [build-script] Migrate "SKIP_BUILD" to Python
Rather than determining which builds to skip in the build-script-impl
shellscript, do so in the Python build-script. A small step towards
achieving SR-237.
2016-02-15 10:48:45 -05:00
Brian Gesiak
64b93aa582 [build-script] Determine BUILD_NINJA in Python
Rather than determining whether to build Ninja in the build-script-impl
shellscript, do so in the Python build-script. A small step towards achieving
SR-237.
2016-02-15 10:48:41 -05:00
practicalswift
9eb2ee0638 [gardening] Fix accidental double spaces 2016-02-14 17:30:44 +01:00
Dmitri Gribenko
a27bea046a Merge pull request #1212 from dgrove-oss/libdispatch_build_plumbing
Next step in connecting libdispatch and foundation builds
2016-02-11 13:46:50 -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
Luke Larson
0356ec8ec3 Add Swift Benchmark Suite 2016-02-08 10:47:58 -08:00
David Grove
05d4aa0ba6 Next step in connecting libdispatch and foundation builds
Three small changes for building libdispatch and foundation together.
  (1) Put libdispatch into PRODUCTS before foundation
  (2) Pass path to swift down into libdispatch build
  (3) Pass paths to libdispatch down into foundation build
2016-02-05 23:25:53 +00:00
Dmitri Gribenko
27be1ab257 build-script: allow to run host-side iOS tests
This change allows to easily run iOS tests that require only running the
compiler, and don't require running the generated code.
2016-02-04 17:19:12 -08:00
Dmitri Gribenko
7ffa8a4198 build-script: remove old cmark migration code 2016-02-04 10:27:20 -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
Dmitri Gribenko
60ae70ce68 Merge pull request #1175 from apple/force-use-libcxx-on-darwin
build-script: force LLVM to use libc++ on Darwin
2016-02-02 17:54:05 -08:00
Mishal Shah
0998f4d10d Swift toolchain build script should require alias and identifier parameters
rdar://problem/23580778
2016-02-02 15:36:13 -08:00
Dmitri Gribenko
79fdc7831d build-script: force LLVM to use libc++ on Darwin
rdar://problem/24452118
2016-02-02 15:04:16 -08:00
William Dillon
ab7c87e7e8 Implemented ARMv6 and fixed up ARMv7 2016-01-29 21:41:22 +00:00
Harlan Haskins
e997fc3ae3 [coverage] Changed 'none' to 'false' for coverage default 2016-01-28 11:23:59 -08:00
Harlan Haskins
bb8160a092 [coverage] Declared SWIFT_ANALYZE_CODE_COVERAGE in CMakeLists and documented options for build-script flag. 2016-01-28 10:35:39 -08: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