Commit Graph

1333 Commits

Author SHA1 Message Date
Michael Gottesman
4aad5801c8 [vacation/gardening] Move clang/swift version specification from build-script-impl => swift_build_support.products. 2016-08-12 10:07:20 -04:00
Michael Gottesman
72603eb944 [vacation/gardening] Move compiler-vendor code from build-script-impl => swift_build_support.products.
This is part of an effort to provide examples on how to migrate product
specific flags from build-script-impl => swift_build_support.products.
2016-08-12 10:07:20 -04:00
Michael Gottesman
14b2dd5296 [build-script] Move computation of LLVM_ENABLE_ASSERTIONS from build-script-impl to swift_build_support.products.LLVM. 2016-08-10 01:30:30 -04:00
Michael Gottesman
a56d6ac068 [build-script] Move llvm-targets-to-build to swift_build_support.products.LLVM from build-script-impl. 2016-08-10 01:30:30 -04:00
Michael Gottesman
c28ce159cb [build-script] Add support for specifying per host cmake options.
These are computed by build-script and passed directly by build-script-impl into
cmake for the relevant target. We can now start to migrate per product cmake
options from build-script-impl into build-script.
2016-08-03 14:17:41 -07:00
Vedant Kumar
aa11349043 [build-script] Disable building llvm with modules by default
There may be some issues building compiler-rt with modules. Temporarily
disable the module build by default until we know more.

rdar://problem/27019000
2016-08-03 10:17:53 -07:00
Vedant Kumar
75fa5ea5c5 [build-script] Enable building llvm with modules by default 2016-08-01 15:39:45 -07:00
Michael Gottesman
b16c2b2a7d [build-script-impl] Remove enable-ubsan flag. This is handled via swift_build_support. 2016-08-01 15:11:09 -07:00
Vedant Kumar
693c8cc2f3 [build-script] Add --llvm-enable-modules
(cherry picked from commit b65a172608)
2016-08-01 15:03:49 -07:00
Jacob Mizraji
f9d6de5ceb Make the llvm-include-tests flag actually do something
Before this patch, it would not actually do anything unless
compute_cmake_llvm_tool_disable_flags()
was called, which is currently dead code, in the state of
build-script-impl currently.
2016-07-29 16:24:56 -07:00
Michael Gottesman
0f1f5d772d [build-script] Add the ability to only build/install toolchain files via the non-fine grained approach, only for this release though.
I am preparing a different PR that reverts this change and will be merged for
swift-4.

This is disabled by default so on the builders it should be NFC.
2016-07-26 00:30:29 -07:00
Michael Gottesman
907f73d121 [build-script] Refactor computation of the flags for disabling LLVM tools to its on function. 2016-07-23 11:51:46 -07:00
Michael Gottesman
88da17fbfa [build-script] If we are not testing Swift as well as not testing LLVM, disable
all parts of LLVM that are not needed for compiling Swift.
2016-07-23 11:51:46 -07:00
Michael Gottesman
bca08025a0 [build-script] Rename source-tree-includes-tests to swift-include-tests.
This matches cmake more closely and also matches the build-script-impl argument
for including llvm tests ("llvm-include-tests").
2016-07-23 11:51:46 -07:00
Michael Gottesman
a457a2290b [build-script] Remove direct setting of the cmake variable LLVM_INCLUDE_TESTS via SOURCE_TREE_CINDLUES_TESTS. It is by default set to True and we turn it off via the variable LLVM_INCLUDE_TESTS now.
This actually became a no-op since the build-script-impl triggered instance of
LLVM_INCLUDE_TESTS is always put strictly after this instance of setting the
cmake variable on the cmake line.
2016-07-23 11:51:08 -07:00
Michael Gottesman
e0d3599a1b [build-script] Rename SKIP_TEST_LLVM => LLVM_INCLUDE_TESTS to match the cmake variable that is being set to false.
This is just a simple NFC cleanup commit.
2016-07-23 11:51:08 -07:00
Michael Gottesman
f6fe775fa9 Revert "Revert "Disable skip-test-llvm to see if that stops the timeouts on the bots.""
This reverts commit a0018459bd.

The timeout is related to 2x tsan/asan tests.
2016-07-23 05:45:17 -07:00
Michael Gottesman
a0018459bd Revert "Disable skip-test-llvm to see if that stops the timeouts on the bots."
This reverts commit ae5e8125e5.
2016-07-23 01:32:13 -07:00
Michael Gottesman
ae5e8125e5 Disable skip-test-llvm to see if that stops the timeouts on the bots. 2016-07-23 00:27:13 -07:00
Michael Gottesman
591c05c3ea [build-script] Set the llvmonly presets to set skip-test-llvm to false. 2016-07-22 17:43:42 -07:00
Michael Gottesman
1716e3129c [cmake] Do not build/link parts of LLVM that we do not use if we are not going to test LLVM.
These are parts of LLVM that Swift strictly /never/ uses, but are used by LLVM
for testing. In a future commit, functionality will be added to build-script to
test LLVM.

Other parts of LLVM that can be used by Swift depending on ones configuration
will be disabled in a future patch via the introduction of a new components
system.
2016-07-22 13:39:32 -07:00
Argyrios Kyrtzidis
488e335dc0 Merge pull request #3594 from jpsim/sourcekit-link-libdispatch
[SourceKit] Link with libdispatch & libswiftCore on Linux
2016-07-20 22:05:13 -07:00
David Grove
3663842b33 build-script: build variant support for libdispatch
Communicate build variant selection to libdispatch build process
using the --with-build-variant argument to libdispatch's configure
script added in libdispatch pull request #110.
2016-07-20 15:49:47 -04:00
Argyrios Kyrtzidis
02f32984b4 Merge pull request #3595 from jpsim/sourcekit-linux-inproc
[SourceKit] use "inproc" variant of SourceKit on Linux
2016-07-19 16:45:53 -07:00
Michael Gottesman
455f3f909e [build-script] Change LLVM_TARGETS_TO_BUILD to be a configurable option from the command line.
While it would be great to leave this as an option only configurable by a change
to the script, it is important that we make this configurable from the command
line so that we can reduce the work needed to be done when compiling with full
LTO.

This is trivially correct due to the way we convert build-script-impl args to
variables (i.e. llvm-targets-to-build => LLVM_TARGETS_TO_BUILD).

rdar://24717107
2016-07-19 14:10:03 -07:00
JP Simard
5634c0d853 [SourceKit] use "inproc" variant of SourceKit on Linux
since the interprocess version likely won't be available for quite some time
given that libXPC hasn't yet been ported, and the in process version nearly
works.

This is NFC since SourceKit still isn't built by default on Linux.
2016-07-18 16:33:29 -07:00
Brian Croom
e109cb8285 [SourceKit] Add libdispatch as a dependency for some SourceKit products
sourcekitdInProc, sourcekitd-test, and complete-test need to be explicitly
linked with libdispatch on Linux to build properly.
2016-07-18 16:17:49 -07:00
Michael Gottesman
6c3dc31bf0 [build-script] Make sure that we build using an external compiler-rt on /all/ platforms, not just OS X.
This is important for a few reasons:

1. It ensures that on all platforms we use the just built clang to compile
compiler-rt. This ensures that the clang used to compiler-rt has all of the
features necessary to compile compiler-rt in the face of changes in the
underlying implementation.

2. It ensures that all platforms build compiler-rt in the same manner.
2016-07-18 12:28:27 -07:00
Michael Gottesman
51af90bc8e [cmake] Rename SWIFT_BUILD_TOOLS => SWIFT_INCLUDE_TOOLS
In LLVM, the convention is that *_INCLUDE_* means that cmake will generate
targets but says nothing about whether or not something will be built by default
or not. This means that as far as cmake is concerned, those targets do not
exist.

On the other hand, *_BUILD_* determines whether or not a class of things is a
dependency of the "all" target. Of course this implies that *_BUILD_* implies
that *_INCLUDE_* must be set to TRUE.

Currently SWIFT_BUILD_TOOLS is implemented like a *_INCLUDE_* option, so change
its name to SWIFT_INCLUDE_TOOLS.
2016-07-12 21:08:55 -07:00
practicalswift
fd47aeff3b Use tr to lower case string (instead of invoking python). 2016-07-12 08:04:05 +02:00
Dmitri Gribenko
52d4d8e245 build-script: strip debug info from libraries and executables
One of the recent build-script refactorings has dropped the parentheses,
restore them.

rdar://problem/27083605
2016-07-10 22:50:49 -07:00
practicalswift
12a147f899 [gardening] Use $(…) instead of legacy . 2016-07-08 20:58:39 +02:00
Michael Gottesman
f81d767478 [build-script-impl] Do not build llvm-config when --skip-build-llvm is passed in. We no longer use it.
Due to my cleanups of Swift's LLVM integration, llvm-config does not need to
ever be built.
2016-07-08 07:12:29 -07:00
Michael Gottesman
7256fcb764 [build-script-impl] Expose the --skip-build-compiler-rt flag.
This was already in build-script-impl in the guise of SKIP_COMPILER_RT. This
just makes the name canonical (i.e. SKIP_BUILD_COMPILER_RT) and also exposes it
via build-script-impl's interface.
2016-07-08 07:09:45 -07:00
Mishal Shah
c8b8838948 Merge pull request #3407 from shahmishal/playground-support
Add support for swift-xcode-playground-support project
2016-07-07 17:26:01 -07:00
David Farler
ff45b5a065 Merge pull request #3263 from bitjammer/separate-remote-mirror-target
Separate remote mirror target
2016-07-07 10:28:08 -07:00
Mishal Shah
34867c55ff Add support for swift-xcode-playground-support project 2016-07-06 16:59:17 -07:00
Michael Gottesman
7aaa56519f [build-script] On buildbots, pass in the -v command into lit instead of -sv.
This enables you to know what tests actually ran instead of just the number of
tests that ran. This helps identify:

1. Tests that are not running, but /should/ be running.
2. Tests that are XFAILED or DISABLED but should not be.
2016-07-06 16:27:18 -07:00
Michael Gottesman
c8352da8a7 [build-script] Remove the setting of LLVM_CONFIG. It is no longer necessary since we use {LLVM,Clang}Config.cmake. 2016-07-01 17:31:10 -07:00
David Farler
42e1cb786c Break SwiftRemoteMirror into its own target.
We want to be able to build a target with just the platform-specific
libswiftRemoteMirror library. This should be a change in build logic
for existing presets but allows for a separate preset to be defined
that just builds the library if/when it's necessary.

- Add --build-swift-remote-mirror option to build-script-impl
- Add swift-remote-mirror known install component.
- Only add SwiftRemoteMirror targets if SWIFT_BUILD_REMOTE_MIRROR is on.
- Move libswiftRemoteMirror into the swift-remote-mirror install component.
- Add swift-remote-mirror install components to existing presets.

rdar://problem/27085666
2016-06-29 15:02:41 -07:00
Jamal Rogers
bbd3f941b0 Build-script: propagate the build type when testing xctest. 2016-06-27 19:10:32 -05:00
Jamal Rogers
f7a838db3d Build-script: propagate the build type to the xctest build script 2016-06-26 12:51:43 -05:00
Brian Gesiak
7ff641a61a Merge pull request #3191 from seabaylea/dispatch-testing
[build-script] Make libdispatch available to TestFoundation and XCTest tests if built
2016-06-24 16:17:47 -04:00
swift-ci
06abbb4c8c Merge pull request #3192 from rintaro/build-script-libdispatch-typo 2016-06-24 13:05:38 -07:00
Brian Gesiak
f12a1323ce [SR-1738] Allow *only* static libraries to be built
This splits the `--build-swift-stdlib` and `--build-swift-sdk-overlay`
arguments into `dynamic` and `static` variants, which makes the
following build command possible:

```
utils/build-script -- \
  --build-swift-dynamic-stdlib=0 --build-swift-dynamic-sdk-overlay=0 \
  --build-swift-static-stdlib=1 --build-swift-static-sdk-overlay=0
```

This command produces *only* static libraries for the stdlib, and no
SDK overlay libraries at all. Many other finely-grained build options
are now possible.
2016-06-24 09:18:24 -07:00
Rintaro Ishizaki
e88b7f09cf [build-script] Fix typo in libdispatch configuration
Also adjust indent.
2016-06-24 23:02:11 +09:00
seabaylea
ae9bb2b577 Make libdispatch available to TestFoundation and XCTest tests if built 2016-06-24 10:13:19 +01:00
Michael Gottesman
be112f18d1 [cmake] Use LLVM_TOOLS_BINARY_DIR from LLVMConfig.cmake and remove any invocation of llvm-config.
There are a couple of things going on in this patch. Lets consider first the
crosscompiling case.

In the cross compiling case, we were already setting LLVM_TOOLS_BINARY_DIR to
the binary dir of the just compiled LLVM (not the native LLVM/clang). This is
exactly what using LLVMConfig.cmake from that just compiled LLVM will set
LLVM_TOOLS_BINARY_DIR.

In the non-cross compiling case, we originally grabbed LLVM_TOOLS_BINARY_DIR
from llvm-config and then used that value to set the NATIVE llvm/clang paths.

rdar://26154980
2016-06-23 18:51:09 -07:00
Michael Gottesman
e24e1f7dee [cmake] Use LLVMConfig.cmake instead of llvm-config to set some variables.
Previously in order to support cross-compiling, we were setting these variables
in build-script. Now that we are using LLVMConfig.cmake, passing in these values
are no longer necessary. As an added benefit, Swift when not cross compiling,
does not need to set these variables anyways.

rdar://26154980
2016-06-22 19:58:20 -07:00
Michael Gottesman
7c92789021 [build-script-impl] Fix obvious typo, where we were using LLVM_BUILD_TYPE instead of CMARK_BUILD_TYPE to set cmark's CMAKE_BUILD_TYPE. 2016-06-21 18:55:07 -07:00