Commit Graph

592 Commits

Author SHA1 Message Date
Adrian Prantl
5ccb4f797e build-script: Pass path to just-built libddispatch and Foundation to dotest.py
rdar://problem/37354542
2018-02-19 11:35:47 -08:00
Davide Italiano
d2a23d9f9c [build-script] Re-enable lldb unit tests in PR testing.
This have been disabled because they were flakey, but now we
should have fixed the issues (or if there's something outstanding,
well, it's the right time to fix).

This is getting more important as we want to increase the set
of `lit/` or `unittest`-style testcases.
2018-02-19 11:28:18 -08:00
Davide Italiano
7503b1eb90 [testsuite] Run only the swift tests for lldb. 2018-02-11 14:03:35 -08:00
Ankit Aggarwal
db1c67334b [build-script-impl] Enable llbuild's Swift bindings
This is no longer a dependency problem because llbuild now builds after
Swift.
2018-02-10 21:44:31 -08:00
Vedant Kumar
4d5684ba0b [build-script] Disable lldb unit tests in PR testing
There is some unresolved flakiness with the unit tests on Linux, which
we don't want interfering with PR testing. See:
https://github.com/apple/swift-lldb/pull/306
2018-02-06 10:07:54 -08:00
Vedant Kumar
10fedbea03 [build-script] Use ${NINJA_BIN} instead of ninja
build-script shouldn't assume ninja is in the system path.
2018-02-02 18:17:41 -08:00
Ross Bayer
84d67961e9 Converted calls to 'sh' into bash calls that use process substitution, which should avoid the 'Argument list too long' error that's been seen on a few CI jobs. (#14367) 2018-02-02 16:38:33 -08:00
Vedant Kumar
85fe1257f9 [build-script] Specify the lldb debugserver explicitly
The CMake build doesn't copy or symlink the system debugserver into its
local build when --lldb-use-system-debugserver is specified, nor should
it IMO. Instead, the CMake build's test targets explicitly specify the
server to use. Since we're not using one of those targets in
build-script, we should also specify the server explicitly.
2018-02-01 15:27:23 -08:00
Vedant Kumar
0a46ed5f61 [build-script] Run lldb tests for Swift support per-commit
- Side-step code signing issues by using the system debug server

- Skip testing categories that add minimal coverage-per-unit-time

- Only enable testing from the whitelisted `swiftpr` category

rdar://35534424

We can't use CMake to build lldb on the bots until the bots upgrade to
CMake >= 3.7: r://37130314.
2018-02-01 15:27:23 -08:00
Vedant Kumar
fa161f7c99 [build-script] Don't disable modules when ASan is enabled
In the past, we needed to disable building swift with -fmodules because
the module caching logic ignored sanitizer flags (rdar://28356072).

This is fixed now, so let's remove the workaround.
2018-01-31 23:23:37 -08:00
Vedant Kumar
76edff5ef8 [build-script] Teach cmake to build the lldb framework
The lldb framework contains modules which the debugger needs.

rdar://36835403
2018-01-31 14:26:10 -08:00
David Zarzycki
91823273d2 [build system] Prefer LLD if it exists (#14165)
Other changes:
1) Minimize unified versus build-script build differences.
2) Stop trying to make runtime variables have "protected" visibility.
   This combination is meaningless and lld rightly complains.

Finally, this blog post is worth reading:
http://www.airs.com/blog/archives/307
2018-01-30 07:18:36 -05:00
Mike Ash
5e2b11d42d Merge pull request #14157 from mikeash/conditionally-disable-runtimefunctioncounters
[Runtime] Remove RuntimeFunctionCounters in no-assert builds.
2018-01-29 15:48:32 -05:00
Mike Ash
6f37cca3e0 [Runtime] Disable RuntimeFunctionCounters tests if the counters are disabled.
Also update how the variable is managed in the build system to allow the test to be conditional based on it, and make it more natural to set it on the command line.
2018-01-26 15:35:33 -05:00
Davide Italiano
d69cf4f0f9 [Debugger] Stop re-running all the issues and hope they pass.
This maybe was needed in the past, but we're moving to a model
where we really want to control what's failing and why. If something
fails, stop re-running. Instead, try to get a proper blame
mail and investigate. This might be a little shaky in the
short term but I'm confident it will go a long way.
2018-01-26 11:30:15 -08:00
Connor Wakamo
3a0eaea24a [build-script] Adjust how PlaygroundLogger and PlaygroundSupport are built.
Instead of building separately, they are now built together using a new workspace with new schemes.
As a result, xcodebuild is now invoked once per-platform, allowing for platform-specific build setting and architecture overrides.

This addresses <rdar://problem/36512531>.
2018-01-23 23:29:20 -08:00
Connor Wakamo
806c01d0a9 [build-script] Merged the PlaygroundLogger and PlaygroundSupport products.
These don't make sense to build separately, and indeed it's likely that PlaygroundLogger will soon depend on PlaygroundSupport.
As a result, build them as one product (playgroundsupport) in build-script.
Aside from removing the playgroundlogger product, this otherwise continues to build PlaygroundLogger and PlaygroundSupport the same way.

This is for <rdar://problem/36512531>.
2018-01-23 23:29:20 -08:00
Connor Wakamo
9bc45e1d17 [build-script] Removed the always-broken support for building PlaygroundLogger on Linux.
As far as I can tell, this never worked, so removing it cannot break anything.
Now PlaygroundLogger is treated similarly to PlaygroundSupport, directly referencing xcodebuild instead of indirecting through variables.
This commit also introduces explicit error messages when attempting to build PlaygroundLogger or PlaygroundSupport for non-Darwin platforms.

This addresses <rdar://problem/36594779>.
2018-01-23 23:29:20 -08:00
Vedant Kumar
330e47d869 build-script: Build lldb with CMake on Darwin
build-script can already build lldb on Darwin using its Xcode project,
but it's useful to support the CMake build as well.

The CMake build allows incremental rebuilds with build-script. I expect
this to significantly cut down on iteration time.

Taking advantage of CMake also lets lldb piggyback on existing support
for sanitizers -- or exciting new build configurations we don't know
about yet -- without having to update the Xcode project file.

rdar://problem/36751944
2018-01-22 19:00:32 -08:00
swift-ci
47212b76f5 Merge pull request #14032 from vedantk/master 2018-01-19 15:56:08 -08:00
Vedant Kumar
7fc95c85ec Revert "Enable stdlib resilience" 2018-01-19 15:02:41 -08:00
Vedant Kumar
f1349088e7 build-script: Pass UBSan options to the lldb xcodebuild invocation
Now, `./build-script --enable-ubsan` will do the right thing if you have
lldb checked out, pending an additional lldb change.

rdar://36630617
2018-01-19 14:29:45 -08:00
Slava Pestov
5535fb8dc3 Merge pull request #13573 from slavapestov/enable-resilience
Enable stdlib resilience
2018-01-18 22:37:32 -08:00
Vedant Kumar
70702b769a build-script: Pass ASan options to the lldb xcodebuild invocation
Now, `./build-script --enable-asan` will do the right thing if you have
lldb checked out.
2018-01-18 15:43:37 -08:00
Slava Pestov
66e30e756e Enable stdlib resilience 2017-12-20 22:40:13 -08:00
Michael Gottesman
0539b9b913 [build-script] I am finding that I also need clang-tablegen-targets as well to get --xcode --skip-build-llvm to work. 2017-12-11 15:22:06 -08:00
Michael Gottesman
4c762cffab [build-script] When skipping building LLVM, make sure to call intrinsics_gen as well as clang-headers.
SILGen depends on headers generated by this build step.
2017-12-11 09:46:58 -08:00
Jordan Rose
572a37520c [build-script] Translate "RelWithDebInfo" to "Release" for Mac LLDB (#13154)
Not all CMake configuration names are valid Xcode configurations at
the moment, but Xcode's "Release" still includes debug info, so it's
probably close enough.
2017-11-29 17:55:14 -08:00
Ross bayer
60c145de87 Ignore missing foundation and libdispatch build directories when attempting to remove them on non-darwin platforms. 2017-11-08 17:43:50 -08:00
Ross Bayer
bef1e6d0f1 Force foundation and libdispatch to re-build always on non-darwin platforms. (#12736) 2017-11-08 16:00:18 -08:00
Anton
735fd3663b [FreeBSD] Fix creation of installable .tar.gz package 2017-10-26 18:26:09 -07:00
Roman Levenstein
c3bc08ec06 Remove any mention of sil-serialize-all related flags from CMake files and build-script-impl
These flags are not needed anymore.
2017-10-21 19:18:15 -07:00
Ankit Aggarwal
c7c97510ef [build-script-impl] Remove destdir from cmake install path for libdispatch
This is passed as an env variable so it is not needed in the prefix.
2017-10-18 22:36:22 -07:00
Michael Gottesman
c2d8cc7ff0 [benchmark] Add support for building out of tree via build-script against the just built swift.
I recently broke the out of tree build by mistake [its fixed now ; )]. This
inspired me to make it easy to test this behavior by adding support to
build-script/cmake/etc for running an external benchmark build via
AddExternalProjects.

Now I can just call build-script with --build-external-benchmarks and thats it!
It should just work! It already helped me to avoid breaking the external build
twice!

I hope that eventually we get this on a bot to make sure it keeps working [or
even added to the smoke tests ; )].

*NOTE* This is disabled by default so it will not affect normal builds.

*NOTE* This just builds the external benchmarks. There is an rpath issue that
prevents you from running them (the benchmarks have the rpath set as if they are
next to the stdlib, but they are not. This can be fixed in a few different ways,
but I do not have time to finish implementing it = (. But this commit is a good
first step and at least detects build errors.
2017-09-25 12:31:39 -07:00
Calvin Hill
aee81d272f Add Initial platform support for Haiku. (#11583) 2017-09-22 21:06:56 -04:00
Pavel Yaskevich
c3ad876c61 [build-script] Add --test-paths option to run subset of tests (#12023)
Sometimes it's useful to be able to run tests located in specific
directories and/or files, let's enable this in `utils/build-script`
using `--test-paths` option which accepts a list of viable test locations.

Resolves: rdar://problem/32004487
2017-09-21 17:35:42 -07:00
Saleem Abdulrasool
5f9c82c751 build: allow skipping test/install of libdispatch on Linux
The conversion was too aggressive and always forced the test and
installation of libdispatch.  The CI system does not install libdispatch
and this broke the build.
2017-09-18 19:15:10 -07:00
Saleem Abdulrasool
8d3c30e2fa build: switch libdispatch build to cmake
Use the cmake based build system for building libdispatch now that it is
able to build Linux, android, and even possible to cross-compile to
Windows.
2017-09-17 17:01:28 -07:00
Ross Bayer
71cefffefc Merge pull request #11733 from Rostepher/build-script-whitespace
Removed trailing whitespace in build-script and build-script-impl
2017-09-08 18:36:55 -07:00
Arnold Schwaighofer
5b7654450a build-script: Add test-optimize-for-size (#11778)
* build-script: Add test-optimize-for-size

* Fix python lint error: line too long
2017-09-06 07:36:40 -07:00
Ross bayer
572be6911a Removed trailing whitespace in build-script and build-script-impl, preparing them for upcoming changes. 2017-09-01 13:50:28 -07:00
Jordan Rose
e994f61e58 Merge pull request #9958 from spevans/pr_static_libs
SR-648: Allow swiftpm to statically link binaries on Linux
2017-07-19 12:52:54 -07:00
Arnold Schwaighofer
f2c8c2a256 Cleanup dead configuration code for copy-on-write existentials
Copy-on-write existentials are enabled and none of these flags are used
2017-07-17 12:22:03 -07:00
Simon Evans
b08023a021 SR-648: Allow swiftpm to statically link binaries on Linux
- If --build-swift-static-stdlib option is used then also produce
  static versions of libXCTest.a and libdispatch.a and put them
  into the lib/swift_static/linux/ toolchain directory.
  libFoundation.a is already being built and deployed there.

- Binaries with the swift libs statically linked in can then be
  built with using the command:

  swift build -Xswiftc -static-stdlib -Xlinker -lcurl -Xlinker -l:libxml2.a -Xlinker -llzma -Xlinker /lib/x86_64-linux-gnu/libz.so.1 -Xlinker -lbsd -Xlinker --allow-multiple-definition

  Note: This is a dynamic binary with the libswiftCore,
  libFoundation and libdispatch libraries statically linked in.

- Further fixes should reduce the complexity of the above command.
2017-06-29 13:04:57 +01:00
Mishal Shah
6d2487d6d1 Add support to skip 32bit iOS simulator tests 2017-06-28 00:18:09 -07:00
Erik Eckstein
31c22e40ae buildscript: Let cpio command handle symlinks in the workspace path 2017-06-22 13:03:33 -07:00
Mishal Shah
c5ff1f2cac Update master to build with Xcode 9 beta 1, OS X 10.13, iOS 11, tvOS 11, and watchOS 4 SDKs. 2017-06-14 16:20:35 -07:00
Arnold Schwaighofer
ca63326e1b Delete unused existential value witnesses from the old existential
implementation

And remove the SWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS flag.
2017-06-02 14:34:41 -07:00
Erik Eckstein
7b6d9afe47 cmake: add a build-script-impl option --report-statistics to pass the -stats-output-dir option when compiling swift libraries 2017-06-01 12:16:20 -07:00
Bob Wilson
68525ce450 swift-stdlib-tool is not a shell script and can be stripped
Before Swift 3.1, we installed the swift-stdlib-tool-substitute script
in place of Xcode's swift-stdlib-tool. This check was added to the build
script (76e99159c1) to avoid trying to strip that file. Now that
swift-stdlib-tool is part of open-source Swift, the -substitute script is
gone and there is no need for this check.
2017-04-29 16:45:34 -07:00