Commit Graph

525 Commits

Author SHA1 Message Date
Ross Bayer
5852aea3e8 [Build System: build-script] Updated the presets module to simplify the API and improve testability. 2020-01-20 02:34:45 -08:00
Ross Bayer
2e73fd7d11 Merge pull request #29266 from Rostepher/remove-old-arguments-module
[NFC][Build System: build-script] Remove swift_build_support arguments module.
2020-01-17 02:15:04 -08:00
Ross Bayer
31f063b8b8 [Build System: build-script] Remove the old arguments module hiding in swift_build_support in favor of the more featureful one living in build_swift. 2020-01-17 00:30:17 -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
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
Eric Miotto
e5e274333f Add support for flag in driver_arguments 2019-12-03 12:09:05 -08:00
Alex Hoppen
869f8b4344 Merge pull request #28005 from ahoppen/unified-build
Build SwiftSyntax and the stress tester using a unified build
2019-11-04 20:02:58 -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
Alex Hoppen
5764b77226 Build SwiftSyntax and the stress tester using a unified build
This avoids recompiling SwiftSyntax for every dependent project.
SwiftEvolve will be added to the unified build next.
2019-11-02 19:48:11 -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
282d0de82f Merge pull request #27871 from ahoppen/swiftsyntax_build_support
Migrate building SwiftSyntax to swift_build_support
2019-10-29 08:45:41 -07:00
Vedant Kumar
157cb2a654 [build-script] Forward --skip-local-build to build-script-impl
Otherwise, build-script-impl ignores --skip-local-build.
2019-10-28 12:20:38 -07:00
Alex Hoppen
7ed085cb55 [build-script] Migrate SwiftSyntax to swift_build_support 2019-10-25 15:58:07 -07:00
Xi Ge
7bb0e9b2dd python: fix lint issues 2019-10-24 12:20:10 -07:00
Alex Hoppen
ea2d44e5b6 [build-script] Don't build stdlib for iOS if --skip-build-ios is passed 2019-10-22 14:32:16 -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
Alex Hoppen
39c3f39b82 [build-script] Add function to compute toolchain path 2019-10-18 18:14:25 -07:00
Alex Hoppen
7be52d3852 [build-script] Extract logic determining whether to test/install a product to separate function
Previously, you were to check if a build/test/install is necessary in
the builds/test/install method which is easy to miss. This gives the
check more visibility.
2019-10-18 10:00:29 -07:00
Jonas Devlieghere
f2215943d8 [build-script] Remove support for building LLDB with Xcode
(cherry picked from commit 0c0c0ee794)
2019-08-23 14:13:17 -07:00
Simon Evans
ec396dc4f0 Linux: Build CMake if the checked out version is newer than the installed version.
- For Linux only, if the checked out CMake repository is a newer version
  than the installed CMake version or CMake is not installed, build and
  use CMake from source.

- This does not affect macOS build or set any minimum required CMake
  version in CMakeLists.txt
2019-08-22 22:51:09 +01:00
Arnold Schwaighofer
257ef70157 Revert "Linux: Build CMake if the checked out version is newer than the installed version." 2019-08-22 14:00:51 -07:00
Simon Evans
ded44f5ba5 Linux: Build CMake if the checked out version is newer than the installed version.
- For Linux only, if the checked out CMake repository is a newer version
  than the installed CMake version or CMake is not installed, build and
  use CMake from source.

- This does not affect macOS build or set any minimum required CMake
  version in CMakeLists.txt
2019-08-21 12:05:36 +01: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
Michael Gottesman
5ac5d435f9 [build-script] Fix a python lint error. 2019-07-22 17:19:20 -07:00
Ben Langmuir
7f3a1e2f62 [build-script] Pass ninja path to indexstore-db/sourcekit-lsp 2019-07-22 11:44:58 -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
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
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
Michael Gottesman
a14186543a Add support for reconfiguring when running arbitrary presets.
This works just by passing reconfigure to build-script-impl. This lets one
remove --reconfigure from presets and let the invoker of the preset decide
whether or not to to reconfigure.
2019-06-02 23:18:37 -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
Daniel Rodríguez Troitiño
def82feff4 [build-script] Move HostSpecificConfiguration out of main script.
This will allow using `HostSpecificConfiguration` from other parts that
are not the main script in the future. This is interesting because the
information is mostly useful when building Swift. The rest of products
are not really interested in the results of these calculations.

Includes a suite of tests that check the implementation correctly
calculates the right targets to build under diverse circumstances.
2019-05-29 14:52:08 -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
d9700def2a Placate linter 2019-05-22 15:58:24 -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
b38834621a Provide shorter name for --expand-build-script-invocation
Adds an --expand-invocation argument, which is now the preferred name for this feature. Leaves the original name in place in case someone is using it in a script.
2019-05-19 16:21:02 -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
Brent Royal-Gordon
26c7f5c5b9 Make --expand-build-script-invocation scriptable
The previous commit moved the note containing the output to stderr. This change prints it on stdout again, but now with no human-consumption prefix so it can be directly executed by tools.
2019-05-18 12:54:47 -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
Daniel Rodríguez Troitiño
5c0e743fa5 [build-script] Introduce ProductBuilder. Transform Ninja to use it.
ProductBuilder allows us to tackle the different way than the different
products need to be build. The builders follow a very simple interface,
but inside them the details are hidden.

Previously the Ninja product was both a Product and ProductBuilder. The
methods that did the build have moved into ProductBuilder to match the
future ProductBuilders.
2019-05-13 12:36:29 -07:00
swift-ci
cfc03f85b6 Merge pull request #23955 from gottesmm/pr-098e8d08913c6672dcb8933d89afcd7c9f900dbd 2019-04-11 12:13:52 -07:00
swift-ci
0de62cb148 Merge pull request #23915 from drodriguez/build-script-host-specific-configuration-take-2 2019-04-11 12:05:11 -07:00
Michael Gottesman
4a6154b4c4 [build-script] Rename ToolchainBenchmarks -> Benchmarks.
This is a better name for the internal interface. The outside option is still
--toolchain-benchmarks to distinguish it from the normal --benchmarks which is
part of swift's cmake.
2019-04-11 10:38:27 -07:00
Daniel Rodríguez Troitiño
5f3c2bf3ce [build-script] Split execute_one_impl_action.
execute_one_impl_action is checking for the validity of its arguments, when it
can be enforced by the structure by using smaller focused methods that trickle
down into a common function.

This structure will eventually allow different builders to participate in a
script invocation. Each builder will be told to build/test/install, and they
will not have to deal with anything else. The content of these smaller methods
will end up as part of the builder that uses build-script-impl.
2019-04-09 17:22:43 -07:00
Daniel Rodríguez Troitiño
536a19a1ec [build-script] Move parts of BuildScriptInvocation into HostSpecificConfiguration.
The calculation of the plaforms to build/test were only used by HostSpeficicConfiguration, but were done in BuildScriptInvocation, and to make things work, the full BuildScriptInvocation object was passed down onto HostSpecificConfiguration. The changes in this commit move the code into HostSpecificConfiguration, and only pass `args` into it to let itself calculate the platforms to build/test.

This will allow in the future that HostSpecificConfiguration can to be removed from the main script file, can be tested and can be used by several parts of the build script process. During a transition period, it will be useful for the builder that delegates to build-script-impl, but in the end, it might only be useful for the Swift builder.
2019-04-09 16:23:30 -07:00
Daniel Rodríguez Troitiño
8cf291dd51 Merge pull request #23865 from drodriguez/build-script-host-specific-configuration-take-1
[build-script] Move some calculations into independent methods.
2019-04-09 14:43:03 -07:00