Commit Graph

131 Commits

Author SHA1 Message Date
Doug Coleman
1f0baffb93 utils/.../ninja.py: Support CXX for ninja builds on Linux.
Without this fix, on Linux, passing --build-ninja looks for g++
and fails to build on the CI.
2017-01-12 16:15:58 -08:00
practicalswift
4a50e7ba9f [gardening] PEP-8 fixes 2017-01-07 21:09:49 +01:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Michael Gottesman
d81be870bc [semantic-sil] When compiling with sil ownership disabled, explicitly disable it.
Otherwise, when one switches from compiling with a semantic sil enabled build to
a normal build, one is still compiling with semantic-sil enabled.
2017-01-04 15:21:30 -08:00
Doug Coleman
51543db9e1 swift_build_support: If we are using the Ninja generator and we have found a toolchain.ninja, use that ninja.
If ninja is installed, treat it as a path to ninja anyway.
2016-12-14 11:44:01 -08:00
practicalswift
b2af4653e4 [gardening] Fix PEP-8 violations. 2016-12-08 18:47:24 +01:00
Michael Gottesman
a9f737c7c7 [swift_build_support] Always emit a compilation_db.
There is no reason not to do this (and it is really cheap) and I want to make
some scripts use it with various clang tooling techniques like clang-tidy to
improve code quality. This will ensure that by default people can just use these
scripts without knowing about how things are working under the hood.
2016-12-06 17:34:21 -08:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Michael Gottesman
857b764730 Add support for creating a compilation db for swift to build-script. 2016-11-11 13:28:30 -08:00
vitalyster
395fe061fd swift_build_support: do not raise exception when capturing shell with… (#5380)
* swift_build_support: do not raise exception when capturing shell with optional flag

This fixes one of https://bugs.swift.org/browse/SR-2966 failed tests when testing environment trying to instantiate FreeBSD toolchain on Linux and `sysctl` is not in the PATH

* swift_build_support: fix shell test
2016-10-20 15:29:01 -07:00
Michael Gottesman
b16d4fa505 [semantic-arc] Add build-script option --enable-sil-ownership to turn on the SIL ownership model.
rdar://28685236
2016-10-11 11:29:12 -07:00
practicalswift
ce3b47e329 [gardening] PEP-8 fixes. 2016-09-25 20:41:55 +02:00
Michael Gottesman
6fd9dca2e6 [benchmark] Allow the number of test samples cmake will use to be specified from the command line.
The benchmark bot uses this functionality today to run the benchmarks. By
default build-script only uses 3 samples for each test. Given the noise on our
systems, this is definitely not sufficient for any sort of robust numbers.

Using this patch, I am going to change the benchmarking bot to take the minimum
of 20 samples as we do for our internal benchmarking. This should help make the
benchmark bot give better data. This will have as a cost cause the bot to take
more time. The testing time issue can be solved down the line by changing to a
protocol where we first do tests with a small number of samples (< 5). Then any
benchmark with a delta > 5% is rerun with 20 samples or perhaps until a
statistical criterion is satisfied. But until that is implemented, this at least
makes the bot useful.

There are other things that need to be changed on the benchmarking bot as well,
namely that it should build on a separate machine from which it is running the
benchmarks on. The benchmarking machine should be quiet and not have any work
being done on it. But that is also for another time.
2016-09-23 20:05:10 -07:00
Michael Gottesman
ab714cfa12 [vacation/gardening] fix python lint errors. 2016-08-12 10:11:18 -04:00
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
88db3ab0e0 [vacation-gardening] Use more unittest.TestCase.assertIn instead of *.assertTrue(foo in bar). 2016-08-12 09:06:17 -04:00
Michael Gottesman
f82f38ef9b [vacation/gardening] Use canonical cmake names for TRUE/FALSE just out of paranoia. 2016-08-12 09:06:17 -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
Robert Widmann
ed9fec7003 Fix python-lint build 2016-08-08 10:24:40 -07:00
practicalswift
3ebfbe4ef0 Remove unused imports. 2016-08-06 20:26:47 +02:00
Michael Gottesman
10bafd67e0 [build-script] Add support for passing into swift -DSWIFT_RUNTIME_USE_SANITIZERS flag. 2016-08-03 14:17:41 -07:00
Michael Gottesman
7611e12bf5 [build-script] Add support for compiling swift with tsan enabled. 2016-08-01 15:11:09 -07:00
Dmitri Gribenko
6eb40a084b build-script: support 4 version components in Clang versions 2016-07-13 22:08:24 -07:00
Mishal Shah
3a945c4bbe [utils] Add test for optional_bool action 2016-06-16 13:33:09 -07:00
Mishal Shah
e4341ab990 [build-script] Add optional_bool action and update build-script to use it 2016-06-15 11:44:21 -07:00
SpringsUp
02ad66db3c [build-script] Infer --android platform flag by presence of a stdlib-target 2016-06-10 08:35:21 +02:00
practicalswift
285b6b526c [gardening] Fix typo. 2016-06-09 10:14:23 +02:00
Daniel Dunbar
3e3fe3fd7c Merge pull request #2960 from ddunbar/freebsd-toolchain-crash
[swift_build_support] Fix crash in FreeBSD toolchain.
2016-06-08 19:24:52 -07:00
Daniel Dunbar
ee4a8432b1 [swift_build_support] Fix crash in FreeBSD toolchain.
- Reported in https://github.com/kylef/swiftenv/issues/36
2016-06-08 17:28:45 -07:00
Daniel Dunbar
3037b21e2d [swift_build_support] Change shell env to be a mapping.
- This is consistent with the `subprocess` API, which this module is otherwise
   closely related to, so I think this makes more sense than taking a list of
   key-value pairs.
2016-06-08 16:21:03 -07:00
Michael Gottesman
2e7d88e5b0 [build-script][lto] Migrate the num_*_parallel_lto_link_jobs code from build-script-impl into build support.
rdar://24717107
2016-06-07 20:59:13 -06:00
rintaro ishizaki
0d6e1b1154 [build-script] Introduce "concat" argument action
Get rid of unnecessary list of list argument.
2016-06-05 00:53:05 +09:00
Dmitri Gribenko
c55e89f55a build-script: allow non-zero exit codes from 'xcodebuild -version -sdk'
Under certain obscure circumstances (incomplete SDKs), xcodebuild can
successfully work with the SDK and print its version number, but will
still exit with a non-zero code.  This change works around the issue by
ignoring the exit code.
2016-06-03 15:50:06 -07:00
rintaro ishizaki
308160a4d4 [build-script] Consistent use of shell.capture in swift_build_support
Eliminate direct `import subprocess`.
2016-06-03 12:09:54 +09:00
Daniel Dunbar
76a39000b4 Merge pull request #2836 from ddunbar/eliminate-SwiftBuildSupport-subprocess-functions
[build-script] Eliminate swift build support subprocess functions
2016-06-02 08:35:37 -07:00
rintaro ishizaki
5959dd2aa1 [build-script] Reject user-supplied '--common-cmake-options' argument
build-script doesn't support manually supplied `--common-cmake-options`.

Introduced argparse action 'arguments.action.unavailable'
2016-06-02 16:17:44 +09:00
Daniel Dunbar
e8b121b6a6 [util] Add swift_build_support.shell.capture.
- This is an analog to `call`, which returns the captured output of the
   command.
2016-06-01 22:57:42 -07:00
Daniel Dunbar
87a17001cc [utils] Switch some random scripts to shell.call. 2016-06-01 22:35:16 -07:00
Daniel Dunbar
01a1559895 [utils] Improve swift_build_support.shell failure messages.
- This improves the error messages when commands fail (or don't exist) to show
   a one-line summary of the issue instead of the Python backtrace, and matches
   what was being done by the matching function in `SwiftBuildSupport`.
2016-06-01 20:03:30 -07:00
Dmitri Gribenko
24885e461c Merge pull request #2830 from ddunbar/introduce-swift_build_support-diagnostics-module
[utils] Introduce swift_build_support.diagnostics.
2016-06-01 18:30:37 -07:00
Daniel Dunbar
daba6275ae [utils/swift_build_suport] Tidy up import order. 2016-06-01 16:40:27 -07:00
Daniel Dunbar
95e35130db [utils] Move quote_shell_command into swift_build_support. 2016-06-01 15:55:25 -07:00
Dmitri Gribenko
d54bb62e94 Merge pull request #2497 from karwa/refactored-build-script
Refactored build-script-impl for cross-compiling support
2016-05-30 14:22:55 -07:00
SpringsUp
0b6790ced2 SDK Autodetection now happens in build script
The old 'swift-sdks' option is migrated for presets
2016-05-30 09:04:10 +02:00
Rintaro Ishizaki
76951281ba [build-script] Use more strict regex for --clang-compiler-version argument 2016-05-30 13:51:28 +09:00
Rintaro Ishizaki
4ebfc085d3 [build-script] Modularize argparse types 2016-05-30 13:42:09 +09:00
Rintaro Ishizaki
36898fc933 [build-script][SR-237] Migrate Ninja build to Python
Migrated impl args:
--build-ninja
--darwin-deployment-version-{osx,ios,tvos,watchos}

Removed impl args:
--build-ninja

Added impl args:
--ninja-bin
2016-05-26 10:29:53 +09:00
rintaro ishizaki
b1109c6344 [build-script] Provide centralized command line and file system interface for build-script. 2016-05-26 10:29:53 +09:00