Commit Graph

421 Commits

Author SHA1 Message Date
Ross Bayer
516ad28c50 Merge pull request #29244 from Rostepher/adopt-six-in-build-swift
[Build System: build-script] Adopt the six compatibility library in the build_swift module.
2020-01-18 11:56:21 -08:00
Andrew Trick
5d3e8b5b7b Merge pull request #29283 from atrick/show-build-targets
Add the target list to build-script --help.
2020-01-17 19:54:49 -08:00
Andrew Trick
90c478f6fc Add the target list to build-script --help.
Teach build-script to print the list of valid targets for the
--stdlib-deployment-targets option. Unfortunately, passing all
supported targets to this option is the only way to force
configuration of those targets. Simply using --ios is no longer
sufficient--none of the iOS targets are actually configured unless you
ask them to be built.

(The reasonable way to use a build config script is to first configure
for all supported platforms, but only build the platforms/targets one
by one when you actually need them).

This currently prints:

  --stdlib-deployment-targets STDLIB_DEPLOYMENT_TARGETS
                        The targets to compile or cross-compile the Swift
                        standard library for. None by default. Comma separated
                        list: android-aarch64 android-armv7 appletvos-arm64
                        appletvsimulator-x86_64 cygwin-x86_64 freebsd-x86_64
                        haiku-x86_64 iphoneos-arm64 iphoneos-armv7 iphoneos-
                        armv7s iphonesimulator-i386 iphonesimulator-x86_64
                        linux-aarch64 linux-armv6 linux-armv7 linux-i686
                        linux-powerpc64 linux-powerpc64le linux-s390x linux-
                        x86_64 macosx-x86_64 watchos-armv7k
                        watchsimulator-i386 windows-x86_64
2020-01-17 18:06:00 -08:00
Ross Bayer
0fdef59633 [Build System: build-script] Adopt the six compatibility library in the build_swift module. 2020-01-17 15:43:54 -08:00
Ross Bayer
bfeb13451e [Build System: build-script] Update the auto-generated preset parsing tests to always supply and exhaustive set of substitutions. 2020-01-17 14:37:15 -08:00
Ross Bayer
7b8401c3f7 [Build System: build-script] Remove the old implementation of the preset parser hidden away in swift_build_support. 2020-01-17 00:25:35 -08:00
Ross Bayer
525708e485 Merge pull request #29265 from Rostepher/remove-assert-not-raises
[NFC][Build System: build-script] Remove TestCase.assertNotRaises method.
2020-01-16 23:30:59 -08:00
Ross Bayer
f5c56f201c [Build System: build-script] Remove the dumb assertNotRaises test method which does less than nothing as it produces right-ward drift without any meaningful semantic benefit. 2020-01-16 21:43:36 -08:00
Ross Bayer
bb22690af0 [Build System: build-script] Moves the rest of the build-script-impl migration code from swift_build_support into build_swift. 2020-01-16 21:00:11 -08:00
Ross Bayer
ff60592ac3 [Build System: build-script] Re-organized the build_swift module to maintain a similar nested structure to swift_build_support and other Python scripting that already exists in the project. 2020-01-15 18:05:59 -08:00
Saleem Abdulrasool
d8cc616602 Merge pull request #28663 from ahoppen/install-swiftsyntax-usr-lib
[build-script] Install SwiftSyntax to usr/lib instead of usr/lib/swift
2020-01-13 14:43:32 -08:00
Mishal Shah
e50b8f9858 [Build System] Add support to set C and CXX launcher with env C_COMPILER_LAUNCHER and CXX_COMPILER_LAUNCHER 2019-12-12 23:47:11 -08:00
Alex Hoppen
91ca8ca093 [build-script] Install SwiftSyntax to usr/lib instead of usr/lib/swift
SwiftSyntax is not part of the standard library and thus should not be
installed in usr/lib/swift.

This also removes the code to install SwiftSyntax's .swiftmodule file
since that code path was never exercised.
2019-12-09 18:27:55 -08:00
najacque
8b378626e4 bumping swift version number to 5.2 rdar://problem/56622958 2019-12-05 17:22:02 -08:00
Eric Miotto
e5e274333f Add support for flag in driver_arguments 2019-12-03 12:09:05 -08:00
Mishal Shah
e74c34c6a1 Bumping Swift version number to 5.1.2 2019-11-30 18:39:05 -08:00
Daniel Rodríguez Troitiño
9498287043 [android] Disable SwiftPM in CI build.
The Android CI build only builds the stdlib because the rest of the
components are build for the host, which is not very useful, since they
are already tested in other CI configurations.
2019-11-04 15:00:45 -08:00
Ankit Aggarwal
7241030876 Move swiftpm to swift_build_support infra
This will allow cleaning up most of the hacks in SwiftPM's build script.

<rdar://problem/56220087>
2019-11-03 03:23:35 +00:00
Ben Langmuir
56e9b2a099 python-lint fixes 2019-10-31 14:44:26 -07:00
Ben Langmuir
11aeb8b7fa Add build-script option --skip-test-toolchain-benchmarks 2019-10-31 09:47:20 -07:00
Alex Hoppen
fcd3457560 [build-script] Migrate SwiftSyntax to swift_build_support 2019-10-29 10:40:09 -07:00
Alex Hoppen
776e2c0030 Revert "Migrate building SwiftSyntax to swift_build_support" 2019-10-29 09:55:32 -07:00
Alex Hoppen
7ed085cb55 [build-script] Migrate SwiftSyntax to swift_build_support 2019-10-25 15:58:07 -07:00
swift-ci
781b1b177f Merge pull request #27809 from ahoppen/typo-build-to-test 2019-10-21 14:56:11 -07:00
Alex Hoppen
af2d9a780a [build-script] Fix typo skip-build-swift -> skip-test-swift 2019-10-21 13:25:23 -07:00
Rintaro Ishizaki
4d31e7e755 [build-script] Fix python-lint issue
rdar://problem/56469555
2019-10-21 11:43:20 -07:00
Alex Hoppen
1926da3fe7 [build-script] Move building swiftevolve to swift_build_support 2019-10-19 19:10:41 -07:00
Alex Hoppen
adbd96bcf1 [build-script] Move building skstresstester to swift_build_support 2019-10-19 19:10:41 -07:00
Dan Zheng
2bd55f6755 [Autodiff upstream] Add build-script flag for differentiable programming. (#27595)
Add `--enable-experimental-differentiable-programming` build-script flag.

The build-script flag enables/disables standard library additions
related to differentiable programming. This will allow official Swift
releases to disable these additions.

The build-script flag is on by default to ensure testing of
differentiable programming standard library additions. An additional
driver flag must be enabled to use differentiable programming features:
https://github.com/apple/swift/pull/27446
2019-10-14 14:34:48 -07:00
swift-ci
f692420e31 Merge pull request #27567 from dcci/skip-local-build 2019-10-08 13:21:24 -07:00
Davide Italiano
b2a1e1c1ff [build-script] Introduce an option to skip local build.
This is useful for cross-compiling.

<rdar://problem/55916729>
2019-10-08 11:16:08 -07:00
Mishal Shah
fff1a39364 [Version] Bump the Swift version to 5.1.1 2019-10-03 14:35:57 -07:00
Ben Langmuir
718a5bf368 [build-script] Installation support for sourcekit-lsp
Add --install-sourcekit-lsp option to build-script and update presets
for package bots to install it.
2019-08-12 13:24:49 -07:00
Ross Bayer
094696702c Merge pull request #25534 from Rostepher/append-no-more-stdlib-deployment-targets
[Build System: build-script] Update the --stdlib-deployment-targets flag to no longer append from multiple uses, instead use the standard last-wins strategy.
2019-06-18 13:24:16 -07:00
Ross Bayer
9dc44b70b5 Merge pull request #25520 from Rostepher/empty-swift-sdks
[Build System: build-script] Update the migration logic for the preset-only option '--swift-sdks' to execute in-place and support empty SDK lists.
2019-06-17 16:15:16 -07:00
Ross Bayer
563bef609f [Build System: build-script] Update the --stdlib-deployment-targets flag to no longer append from multiple uses, instead use the standard last-wins strategy. This aligns better with the existing documentation for the argument and the similar --build-stdlib-deployment-targets flag. 2019-06-17 16:13:58 -07:00
Ross Bayer
ef0b49d96e [Build System: build-script] Update the migration logic for the preset-only option '--swift-sdks' to execute in-place and support empty SDK lists. 2019-06-17 13:42:52 -07:00
Saleem Abdulrasool
7ff22f5b7a Merge pull request #25266 from drodriguez/windows-fix-python-tests
[windows] Fix Python tests in Windows.
2019-06-11 10:35:02 -07:00
Ross Bayer
8db65b35a4 Merge pull request #25122 from Rostepher/darwin-supported-archs
[Build System: CMake] Darwin Supported Archs and Modules.
2019-06-10 12:03:04 -07:00
Daniel Rodríguez Troitiño
3fb9a2a7a4 [windows] Fix Python tests in Windows.
- Forward several environment variables to the test environment because
Windows uses them to inform the processes about things like the number
of processors and the architecture.
- Normalize some literal Unix paths to be the same as the results in
Windows, that will have forward slashes and the drive letter.
- Skip some test that use build-script-impl and tests that check for
files being executable (everything is executable in Windows).
- Don't use the owner and group arguments for tar on Windows.
- Hide the stderr output of which. In Windows it prints the full PATH in
case of failures, which is disrupting.
- Quote many paths in Windows in the output of build-script results.
- Provide a version of mock-distcc that can be executed in Windows. The
raw Python script cannot.
- Change the expected results for clang/clang++ to the right values in
Windows (clang-cl in both cases).
2019-06-06 11:30:22 -07:00
Arnold Schwaighofer
959a6acc28 Fix build-script's handling of --test-optimize-none-with-implicit-dynamic 2019-05-31 11:22:09 -07:00
Ross Bayer
1da11512e7 [Build System: build-script] Add new build-script options to specify supported architectures and module-only architectures on Darwin platforms. 2019-05-29 17:50:56 -07:00
Michael Gottesman
5f15385c42 [build-script] Add a presets for building/testing the stdlib standalone against a swift.org toolchain
This hopefully provides an example for other people on how to do this sort of
thing.

The presets are called "stdlib_RDA,standalone{,[,]notest}". It requires one parameter:
toolchain_path which should be the bin directory of your toolchain. Example:

```
build-script --preset=stdlib_RDA,standalone toolchain_path=$MY_TOOLCHAIN/usr/bin
build-script --preset=stdlib_RDA,standalone,notest toolchain_path=$MY_TOOLCHAIN/usr/bin
```
2019-05-28 21:32:04 -07:00
Michael Gottesman
e8807296ae [build-script] Add an option to only run executable tests. Off by default. 2019-05-27 13:51:13 -07:00
Brent Royal-Gordon
a60e0e0c84 Add build-script -a/-A to control assertions
These are super-important in certain circumstances, paritculalry benchmarking, and deserve a shorthand.
2019-05-25 13:19:20 -07:00
Brent Royal-Gordon
af7e2da9ca Replace —print-build-dir with --dump-config
The --dump-config option prints a recursive JSON dump of the BuildScriptInvocation object’s properties, which gives access to essentially all of the knowledge build-script has about the build before it starts performing it. This makes the output more flexible and extensible without severely convoluting the implementation, but doesn’t really give us a stable representation of that data.
2019-05-19 20:58:14 -07:00
Brent Royal-Gordon
85b30c3cc9 Add --print-build-dir option to build-script
If passed, build-script doesn’t build anything; it just prints the full path to the directory the invocation would have built its products in. This is intended to allow you to build tools which take build-script options like --debug and --xcode and use them to determine the build directory you’re currently using.
2019-05-18 13:06:37 -07:00
Julian Lettner
4dcb49d8e7 Merge pull request #24330 from apple/preset-for-llvm-tsan-libdispatch-tests
[build][Linux] Create preset to run LLVM's TSan libdispatch tests
2019-05-17 10:32:55 -07:00
Julian Lettner
9631700d9e [build][Linux] Create preset to run LLVM's TSan libdispatch tests
Build a separate compiler-rt instance for running the tests. It is built
and tested against an installed toolchain instead of the llvm-build-dir.

Install everything we need to run tests (CMake modules, FileCheck, etc.)
into the toolchain directory.

Add synthetic target 'all' for llvm-install-components. Also we must set
LLVM_INSTALL_UTILS=ON, so the utilities required by tests (e.g.,
FileCheck) are included in the install target.
2019-05-16 13:17:30 -07:00
Ted Kremenek
4beb673b8e Bump compiler version to Swift 5.1 (#24671)
* Bump version to Swift 5.1

* Update tests with compiler version bump

* Undo flatMap and math obsolescences
2019-05-13 07:32:39 -07:00