Commit Graph

273 Commits

Author SHA1 Message Date
Michael Gottesman
5fbf769b2a [asan] On Linux, when running with ASAN, disable leaks detection.
The reason to do this is that:

1. We already have a separate leaks bot.
2. We are not leaks clean at -O, but are ASAN clean at -O.

It doesn't make sense to limit our ability to verify that on Linux, we stay ASAN
clean at -O since we are not leaks clean at -O. Once we get leaks clean at -O,
we should create a separate bot.

rdar://31276806
2017-10-22 15:22:32 -07:00
Ross Bayer
b62704bc03 Removed duplicate logic for determining the stdlib deployment targets from apply_default_arguments in build-script. (#12428) 2017-10-15 16:56:17 -07:00
Ross Bayer
615355c556 [build-script] Move non-trivial argument default logic (#12408)
* Moved argument-defaults logic that should be determined outside the actual parser back into the build-script. This logic will be relocated again at a later date to a more suitable module with testing.

* Moved test-paths argument default logic into build-script until it can find a better home in the future.

* Removed old default value for stdlib_deployment_targets from the expected options.
2017-10-13 12:25:38 -07:00
Ross Bayer
a14524e4e6 Revert erroneous renaming of test_*_host destinations to test_*_device. (#12127) 2017-09-26 16:20:55 -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
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
Ross Bayer
ef7c951949 Affirmative names for argument parsing namespace destinations. (#11952)
* Added new OptionalTrueAction and OptionalFalseAction classes to the arguments module.

* Fixed missing return statement in help-test generator.

* Renamed all the `skip_build_*` names to the more simple and affirmative `build_*`.

* Renamed all the `skip_test_*` names to the more simple and affirmative `test_*`.

* Added documentation to the OptionalTrueAction and OptionalFalseAction classes.
2017-09-15 16:21:38 -07:00
Ross Bayer
695ded24d4 Move legacy argparser (#11872)
* Implemented a (mostly) comprehensive test suite for the argument parser (ab)using metaclasses to dynamically generate unit-tests for each valid argument and preset.

* Fixed failing defaults test for build_ninja.

* Added new HelpOption and IgnoreOption classes for generating tests.

* Converted default value test into individual generated tests which should give better output in case the default tests fail.
2017-09-15 01:05:06 -07:00
Ross Bayer
d4d35acbd0 Move build-script apply default arguments into separate module (#11882)
* Moved the default argument application logic to the new driver_arguments module in preparation for the larger argument parsing refactor.

* Re-ordered imports in order to satisfy python linter.
2017-09-13 17:09:49 -07:00
Ross Bayer
a66a27db9f Moved the argument parsing logic from the default main function in build-script into a separate module. (#11880) 2017-09-12 16:38:11 -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
Mishal Shah
b0d70edf04 Merge pull request #11324 from apple/enable-ios-simulator-32bit-test
[lit] Enable testing for iOS 32-bit simulator by default
2017-09-08 15:39:24 -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
Michael Gottesman
6a6efd9f4e Merge pull request #11463 from KingOfBrian/documentation/DeveloperOnboarding
Update README.md
2017-08-21 14:00:33 -07:00
Ewa Matejska
fcc515b8f0 Bump default version in buid script 2017-08-18 15:41:06 -07:00
Brian King
a5b85f67db Improve language around presets 2017-08-17 20:41:31 -04:00
Brian King
4a4d7d0a49 Remove comment about arguments after 2017-08-15 08:37:51 -04:00
Brian King
584640edfa Move advanced usage note about into the build script help. 2017-08-14 19:20:22 -04:00
Mishal Shah
f389ce3c2e [lit] Enable testing for iOS 32-bit simulator by default 2017-08-02 20:51:51 -07:00
Sean Callanan
84e76bfb1e [build-script] Build the Mips target, which LLDB supports and tests. 2017-08-02 16:53:35 -07:00
swift-ci
475d8e027f Merge remote-tracking branch 'origin/master' into master-next 2017-06-28 21:49:20 -07:00
Dave Abrahams
9b18c4f1e3 No backtrace when Ctrl-C interrupts build-script 2017-06-28 21:11:21 -07:00
Greg Parker
7b009eccde Merge remote-tracking branch 'origin/master' into master-next 2017-06-28 15:25:17 -07:00
Mishal Shah
4d35bd2ca0 Skip iOS 32bit simulator tests by default 2017-06-28 00:27:22 -07:00
Mishal Shah
6d2487d6d1 Add support to skip 32bit iOS simulator tests 2017-06-28 00:18:09 -07:00
Michael Gottesman
aa4e2dac2c [build-script] Add support for compiling swift with leaks sanitizer.
This only enables the swift compiler (not its output) to be used with leaks
sanitizer on linux.

Some important notes: On Linux, right now we are not completely leak clean. I
was only able to get a -Onone build of the stdlib without triggering lsan (I was
unable to run the optimizer and the tests successfully). Additionally even at
-Onone, I had to suppress some leaks in the driver. The point of this though is
to prevent any further -Onone leaks from being committed to the tree since
-Onone leaks that are not bounded (unlike the driver bugs) could cause SourceKit
to leak memory. Since SourceKit is a long running process... such a type of leak
would be bad.

rdar://32876901
2017-06-22 12:52:12 -07:00
swift-ci
a7fc8ac913 Merge remote-tracking branch 'origin/master' into master-next 2017-04-28 14:08:31 -07:00
Ted Kremenek
7c664d1835 Bump default version in build script. 2017-04-19 13:02:09 -07:00
swift-ci
bed8336b4e Merge remote-tracking branch 'origin/master' into master-next 2017-04-05 09:48:31 -07:00
Hugh Bellamy
36645a0976 Address FIXMES for cleaning up imports in build-script and friends 2017-04-01 09:54:01 +07:00
swift-ci
b5f58e7763 Merge remote-tracking branch 'origin/master' into master-next 2017-03-30 15:08:31 -07:00
Michael Gottesman
e3858d304c [build-script] Use the build-script-impl from the swift repo that invoked build-script.
In the past if one wanted to be able to develop using multiple swift repos, one
was often stymied by build-script always using build-script-impl from the swift
directory. This includes the case where one invokes the build-script from a
hypothetical directory called swift-2.
2017-03-30 14:32:54 -07:00
swift-ci
bf5fae93d1 Merge remote-tracking branch 'origin/master' into master-next 2017-03-29 18:28:30 -07:00
Bob Wilson
d23be6e3de [build-script] Set the TOOLCHAINS variable in the environment.
On Darwin platforms, the Swift build scripts generally use "xcrun" to
locate various tools, and the build-script's darwin-xcrun-toolchain option
is specified to xcrun. However, with the change to use the just-built clang
to build the runtime (PR #6112), there was an issue with the linker. Clang
normally tries to run the linker from the same directory as the clang
binary, but when there isn't one, it falls back on /usr/bin/ld, which is
just an xcrun-like wrapper. Since there is no way to specify an explicit
toolchain option in that case, set TOOLCHAINS in the environment to
make it use the linker from the specified toolchain.
rdar://problem/30709330
2017-03-29 17:29:16 -07:00
swift-ci
4ed594bf88 Merge remote-tracking branch 'origin/master' into master-next 2017-03-26 20:28:53 -07:00
Michael Gottesman
912a162e57 [build-script] Give ubsan, tsan the same treatment I gave asan in 824ffa6857. 2017-03-26 20:07:14 -07:00
swift-ci
101f3448b3 Merge remote-tracking branch 'origin/master' into master-next 2017-03-22 20:28:43 -07:00
Doug Coleman
e7390d1770 Revert "utils: Add swiftenvs, which allow the overriding of compiler tools."
This reverts commit 2b923f3846.
2017-03-22 20:09:34 -07:00
swift-ci
94b99619e8 Merge remote-tracking branch 'origin/master' into master-next 2017-03-22 17:08:53 -07:00
Doug Coleman
e480227d82 Revert "swiftenv-script: Fix some issues with swiftenvs." 2017-03-22 17:00:21 -07:00
swift-ci
a5a00d3979 Merge remote-tracking branch 'origin/master' into master-next 2017-03-22 13:28:44 -07:00
Doug Coleman
351a515f6c swiftenv-script: Bug fixes for swiftenv.
Fix the mocked output files of swiftc. Change the lookup of
clang from build-script to build-script-impl like all the other
commands. Pass more args to LLVM. Fix swiftenv creation. Fix unit tests.

The reason this patch works is that build-script-impl gets
all the arguments that are not handled by build-script.
2017-03-22 12:47:33 -07:00
swift-ci
46555ae563 Merge remote-tracking branch 'origin/master' into master-next 2017-03-21 16:48:43 -07:00
Doug Coleman
2b923f3846 utils: Add swiftenvs, which allow the overriding of compiler tools. 2017-03-21 14:59:12 -07:00
swift-ci
44175c566b Merge remote-tracking branch 'origin/master' into master-next 2017-03-17 00:28:50 -07:00
Hugh Bellamy
c6fcbf0510 Python lint a bunch of files not currently python linted 2017-03-17 14:11:00 +07:00
swift-ci
5a5f35c67f Merge remote-tracking branch 'origin/master' into master-next 2017-03-14 20:08:54 -07:00
Greg Parker
1b39852682 [build] Clean up lack of support of iOS device tests.
* Add --ios-all etc with a helpful error
  message for those who think it exists.
* Reject --ios --host-test early to avoid a cryptic
  "build target does not exist" error much later.
2017-03-14 19:49:30 -07:00
swift-ci
324ffb5cea Merge remote-tracking branch 'origin/master' into master-next 2017-02-24 11:08:49 -08:00