Commit Graph

968 Commits

Author SHA1 Message Date
Michael Gottesman
7505b6b8dd [lto] Use -DLLVM_ENABLE_LTO to enable llvm lto instead of -DCMAKE_{C,CXX}_FLAGS
This not only is the more canonical way to enable lto in LLVM but in addition
without this change, the swift compiler unittests will not build with LTO
resulting in funky LTO errors like rdar://25968091.

rdar://24717107
2016-05-01 13:12:04 -07:00
Daniel Dunbar
d525b8320b [build-script] Don't try to build llbuild Swift bindings as part of build-script.
- llbuild builds before Swift, so we can't use the Swift compiler we are in the
   process of building for it. For now, just disable the bindings entirely.

   This will be a problem if SwiftPM ever decides that it wants to use the Swift
   bindings to manage builds more effectively.
2016-04-29 14:22:56 -07:00
swift-ci
912017e4fc Merge pull request #2295 from rintaro/build-script-common-cmake-options 2016-04-29 05:03:07 -07:00
Rintaro Ishizaki
bb5e589cf6 [build-script] build full stdlib when --long-test
--long-test implies `validation-test`.
stdlib target should be `swift-stdlib-xxx` instead of
`swift-test-stdlib-xxx`
2016-04-29 18:04:50 +09:00
swift-ci
43a2141df2 Merge pull request #2259 from briancroom/use-xctest-build-script 2016-04-28 23:29:19 -07:00
swift-ci
d86ca51c8c Merge pull request #2217 from rintaro/build-script-tests-execution 2016-04-28 03:56:10 -07:00
Brian Croom
b538224d67 [build-script-impl] Call into the XCTest build_script.py on all platforms
No longer invoke xcodebuild directly on Darwin for building and testing,
because XCTest's own build script now contains the platform-specific
logic.
2016-04-25 13:41:19 -04:00
Rintaro Ishizaki
4926ed55f1 [build-script][SR-237] Migrated calculation of BUILD_ARGS to Python.
Calculate `BUILD_ARGS` in `build-script`, then pass them to
`build-script-impl` using existing `--build-args` argument.
2016-04-25 16:20:40 +09:00
Rintaro Ishizaki
c025590c88 [build-script][SR-237] Migrated calculation of COMMON_CMAKE_OPTIONS to Python.
Calculate `COMMON_CMAKE_OPTIONS` in `build-script`, then pass them to
`build-script-impl` using newly introduced `--common-cmake-option` argument.
2016-04-25 14:27:29 +09:00
swift-ci
23025e48db Merge pull request #2282 from rintaro/build-script-llvmtypo 2016-04-24 17:25:54 -07:00
Rintaro Ishizaki
fda99d16ef [build-script] Fixed --extra-cmake-options
- Get it to work as `build-script` arguments.
- Fixed quoting problem
- Replaced --user-config-args: Error for --user-config-args.
- Moved to the position where it can override any options
2016-04-24 22:14:25 +09:00
swift-ci
4e9d2b77a2 Merge pull request #2281 from rintaro/build-script-sourcedir 2016-04-24 05:59:02 -07:00
swift-ci
00a5e1feca Merge pull request #2257 from rintaro/build-script-migration-simple 2016-04-24 05:34:53 -07:00
Rintaro Ishizaki
7a3f2bf24a [build-script] Ensure that the source directory argument is the last of cmake arguments
cmake [OPTIONS ...] <source_dir>
2016-04-24 19:37:26 +09:00
Rintaro Ishizaki
984e5cc261 [build-script] Fixed a typo in llvm configuration 2016-04-23 17:29:17 +09:00
Mishal Shah
5473e48495 Merge pull request #2271 from shahmishal/master
[Toolchain] Add Swift & Bitcode related build settings to Swift toolc…
2016-04-22 14:54:54 -07:00
Michael Gottesman
302b6858ce [gardening][build-script-impl] Use += with arrays.
Its cleaner than doing:

array=(
  "${array[@]}"
  x
  y
)
2016-04-22 14:08:19 -07:00
Michael Gottesman
cf544347da [lto][build-script-impl] SWIFT_PARALLEL_LINK_JOBS should always be set even if we do not need to set the c standard computed defaults due to a cmake bug. 2016-04-22 14:08:19 -07:00
Mishal Shah
79d7eab0bb [Toolchain] Add Swift & Bitcode related build settings to Swift toolchain
rdar://25472633
2016-04-21 15:49:06 -07:00
Mishal Shah
55086c9d16 [Toolchain] Fix Compatibility version 2016-04-21 15:35:02 -07:00
Mishal Shah
0e351b633c Merge pull request #2266 from shahmishal/master
[Toolchain] properties for ShortDisplayName and CreatedDate
2016-04-21 15:32:55 -07:00
Slava Pestov
98abbdb332 Emit reflection metadata, but not reflection names, by default
This allows the reflection type lowering test to pass with the
default build configuration.
2016-04-21 15:15:30 -07:00
Michael Gottesman
fc792949d2 [lto][build-script-impl] Fix typo that broke the LTO build. 2016-04-21 14:25:39 -07:00
Michael Gottesman
b12a874d7a [lto][build-script-impl] Move true_false before all uses. 2016-04-21 14:25:15 -07:00
Mishal Shah
9c5c5de889 [Toolchain] properties for ShortDisplayName and CreatedDate 2016-04-21 14:11:39 -07:00
Mishal Shah
3f83d6bafa Set toolchain CompatibilityVersion
rdar://24469738
2016-04-21 12:32:27 -07:00
rintaro ishizaki
a8ee8c33ec [build-script] Check build-script-impl arguments before processing in 'build-script'. 2016-04-21 22:45:43 +09:00
Brian Gesiak
a7e2329444 [android] Support latest Android NDK r11c
- Update the documentation to reflect that Swift supports (only)
  the latest NDK version. Based on what I've heard from Android
  developers that use the NDK, this is a reasonable requirement.
- The most recent version of the Android NDK no longer includes a
  "4.8" toolchain version. Change the default to "4.9", and update
  the paths in the documentation to match.
- The build script option "--android-ndk-version" was misleading.
  This parameter actually refers to the Android API level. Swift
  currently supports 21 (Android 5.0) and above (although supporting
  lower API levels would be desirable).
2016-04-20 11:20:29 -04:00
Mishal Shah
039331c461 Merge pull request #2213 from apple/build-script-long-tests
CMake & build-script: add a new tier of testing, "long tests"
2016-04-18 13:04:20 -07:00
Dmitri Gribenko
9963ea4b96 Merge pull request #2216 from rintaro/build-script-unused-opts
[build-script] Remove unused cmake options from Swift configuration.
2016-04-18 09:19:14 -07:00
rintaro ishizaki
6f1d5bf001 [build-script] Clear CMakeCache.txt before (re)configuration. 2016-04-18 03:39:38 +09:00
Dmitri Gribenko
457f2b901c CMake & build-script: add a new tier of testing, "long tests"
* The behavior of `build-script -t` is unchanged.

* `build-script -T` continues to run primary and validation test suite,
  but without the long tests.

* `build-script --long-test` runs just the long tests.

* `build-script -T --long-test` runs all tests.
2016-04-16 14:03:54 -07:00
rintaro ishizaki
25b8de2cf0 [build-script] Tests should fail if one of test commands failed. 2016-04-16 16:35:34 +09:00
Rintaro Ishizaki
5195daeecb [build-script] Remove unused cmake options from Swift configuration. 2016-04-16 16:27:28 +09:00
Dmitri Gribenko
afbc9fe80b build-script: use simpler syntax to append to arrays 2016-04-15 17:19:58 -06:00
Brian Gesiak
4ac6cb732f [build-script] Remove extra "cross tools" variable
We can use one variable here instead of two, in order to make the build
script a little easier to read.
2016-04-15 16:16:36 -04:00
Brian Gesiak
a4537e8a0f [SR-237] Move stdlib deployment targets to Python
Migrate the logic that determines which platforms to build the stdlib
for to Python. This is applies both as an effort to migrate more of the
build script to Python (https://bugs.swift.org/browse/SR-237), but also
as a means of splitting up the work necessary to cross-compile the Swift
stdlib from OS X to Linux.
2016-04-14 16:49:51 -04:00
swift-ci
728d21a00d Merge pull request #1442 from SwiftAndroid/master 2016-04-12 23:30:17 -07:00
Slava Pestov
9d6f723d14 Reflection: Add -swift-stdlib-enable-reflection-metadata flag for testing
This causes IRGen to emit metadata for our new out-of-process reflection
mechanism. Eventually this flag should be the default.
2016-04-12 19:15:36 -07:00
Zhuowei Zhang
7c502b6344 Port to Android
This adds an Android target for the stdlib. It is also the first
example of cross-compiling outside of Darwin.

Mailing list discussions:

1. https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151207/000171.html
2. https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000492.html

The Android variant of Swift may be built using the following `build-script`
invocation:

```
$ utils/build-script \
  -R \                                           # Build in ReleaseAssert mode.
  --android \                                    # Build for Android.
  --android-ndk ~/android-ndk-r10e \             # Path to an Android NDK.
  --android-ndk-version 21 \
  --android-icu-uc ~/libicu-android/armeabi-v7a/libicuuc.so \
  --android-icu-uc-include ~/libicu-android/armeabi-v7a/icu/source/common \
  --android-icu-i18n ~/libicu-android/armeabi-v7a/libicui18n.so \
  --android-icu-i18n-include ~/libicu-android/armeabi-v7a/icu/source/i18n/
```

Android builds have the following dependencies, as can be seen in
the build script invocation:

1. An Android NDK of version 21 or greater, available to download
   here: http://developer.android.com/ndk/downloads/index.html.
2. A libicu compatible with android-armv7.
2016-04-12 19:26:21 -04:00
Argyrios Kyrtzidis
fb7b717951 Merge pull request #2146 from apple/buildscript-extra-cmake-vars
[utils/build-script] Introduce '--extra-cmake-vars' option
2016-04-12 13:30:12 -07:00
Argyrios Kyrtzidis
abecb2f6a9 [utils/build-script] Change '--extra-cmake-vars' to '--extra-cmake-options'.
This is more consistent with the rest of build-script for handling CMake options.
2016-04-12 09:53:45 -07:00
Todd Fiala
f5d88ce0bf Merge pull request #2144 from tfiala/master
lldb test suite: use just-built clang by default
2016-04-11 18:38:34 -07:00
swift-ci
c3ef9390eb Merge pull request #2141 from briancroom/relative-symlinks 2016-04-11 17:38:48 -07:00
Argyrios Kyrtzidis
9ebc8a33f8 [utils/build-script] Introduce '--extra-cmake-vars' to allow setting any CMake veriables when configuring the targets. 2016-04-11 16:30:22 -07:00
Todd Fiala
268d03842a lldb test suite: use just-built clang by default
build-script-impl now takes a --lldb-test-cc flag:

* when not specified, it will default to using the
  just-built clang (i.e. in tree with swift) to
  build the C/C++ test suite test inferior programs.

* when specified and equal to "host-toolchain", the
  test suite test inferiors will be built with
  the same compiler chosen as --host-cc.

* when set to anything else, it is assumed to be the
  full path to a C compiler to use for compiling
  LLDB test suite test inferiors.

Note the LLDB test suite only takes the C compiler and
derives the C++ compiler from the C compiler path.  There
is no need to specify the C++ compiler directly.

Addresses the following issue:
https://bugs.swift.org/browse/SR-1207
2016-04-11 14:45:10 -07:00
Brian Croom
49c7200539 [build-script] Create relative symlinks into the llvm tree. 2016-04-11 16:03:54 -04:00
Brian Croom
1288da298d [build-script] Use the correct build directory when building Darwin XCTest 2016-04-11 08:18:02 -04:00
practicalswift
1ef6ea8c4c [gardening] \t → " " 2016-04-08 21:59:13 +02:00
Argyrios Kyrtzidis
f242326627 [SourceKit] Use DARWIN_TOOLCHAIN_VERSION if provided, as the version to use for the XPC service name.
This is to make service name in the external toolchains unique.
rdar://25612603
2016-04-07 21:34:26 -07:00