Commit Graph

752 Commits

Author SHA1 Message Date
Saleem Abdulrasool
15a5d2c54b Revert "[android] Update to NDK 23" 2021-10-16 11:07:23 -07:00
swift-ci
46f3cc9dd8 Merge pull request #39045 from buttaface/android-ndk-23 2021-10-15 20:55:19 -07:00
David Rönnqvist
f662d50684 Add build script products for Swift-DocC and Swift-DocC-Render
(rdar://79703353)
2021-10-13 12:36:28 -07:00
Butta
7fa1b4b2ac [android] Update to NDK 23
The latest Long Term Support NDK finally removed binutils, including the bfd/gold
linkers and libgcc. This simplifies our Android support, including making lld the
default linker for Android. Disable three reflection tests that now fail, likely
related to issues with swift-reflection-dump and switching to lld.

Also, add the libatomic dependency for Android armv7, just as on linux.
2021-10-12 12:37:01 +05:30
Alex Hoppen
fb7a5b8a38 [BuildScript] Don't install SwiftSyntax
Instead, link all binaries in the toolchain using SwiftSyntax (currently only `sk-stress-test`) should link to the binary statically. This simplifies the way SwiftSyntax is built and at the same time slightly reduces the toolchain size.
2021-10-11 22:04:11 +02:00
Eric Miotto
a0c6367145 Address Python lint issue in unrelated file 2021-10-01 15:09:41 -07:00
Eric Miotto
6fbc9623fb Don't include tests for back deploy concurrency product
Addresses rdar://83777172
2021-10-01 12:30:45 -07:00
Erik Eckstein
af71088d29 libswift: bootstrapping build
Adding build modes for libswift: off, hosttools, bootstrapping, bootstrapping-with-hostlibs
The two bootstrapping modes are new. For details see libswift/README.md
2021-09-28 18:51:42 +02:00
Max Desiatov
b1236e92f9 swift_build_support: Add WASI to StdlibDeploymentTarget (#39244)
This change adds support for WASI to `StdlibDeploymentTarget` in `swift_build_support/targets.py`. This will allow us to build stdlib for WASI in the future.

Related to SR-9307.
2021-09-27 17:59:38 +01:00
Zoe Carver
9313efc911 Merge pull request #39353 from zoecarver/allow-cmake-swift-override
[build] Allow `CMAKE_Swift_COMPILER` to be overriden.
2021-09-21 20:02:47 -04:00
zoecarver
5d2dd07eff [build] Allow CMAKE_Swift_COMPILER to be overriden.
If `CMAKE_Swift_COMPILER` is defined, the build script will now use that.
2021-09-17 17:05:39 -07:00
Karoy Lorentey
e73ef1fd87 [benchmark] Set SWIFT_DETERMINISTIC_HASHING while running benchmarks in regular smoke tests 2021-09-16 20:23:32 -07:00
Doug Gregor
0068722088 Fix the host-specific installation destdir for build-script products.
Prior to this, build-script products that build in the host-specific
directories for cross-compilation would get the wrong path, and
therefore wouldn't get picked up in toolchain builds.
2021-09-10 20:54:46 -07:00
Doug Gregor
d52d4d56af Fix Python lint warning 2021-09-09 14:57:08 -07:00
Doug Gregor
da50b81c4f Prefer just-built compiler when building back-deployed concurrency library 2021-09-09 09:34:17 -07:00
swift-ci
0c122a514f Merge pull request #38673 from buttaface/skip-clean 2021-08-30 16:27:14 -07:00
Doug Gregor
599974367e Enable concurrency back-deployment in the compiler by default.
Remove the option that explicitly enables concurrency back-deployment,
and instead always enable its support in the compiler. Remove the use
of the extraneous CMake option as well.
2021-08-28 22:43:41 -07:00
Doug Gregor
529abeee22 Merge pull request #39061 from DougGregor/concurrency-back-deploy-libraries-ci
Enable concurrency back deployment in CI configurations
2021-08-28 07:47:45 -07:00
Doug Gregor
6d6c2e69bf [build-script] Add --install-back-deploy-concurrency.
Allow the installation of the back-deployment shared libraries for
concurrency via build-script.
2021-08-27 08:58:52 -07:00
Michael Gottesman
e23525601e Merge pull request #38888 from gottesmm/stage2-swift-split-build-script-impl
[build-script] Split the build-script-impl pipeline into two pipelines so I can put a build-script product pipeline in between.
2021-08-27 06:31:35 -07:00
Michael Gottesman
4f149d07ce [build-script] Split the build-script-impl pipeline into two pipelines so I can put a build-script product pipeline in between.
This is where I am going to put the stage 2 swift. The reason why I need to do
this is that I need libdispatch, foundation, etc on Linux to use the stage2
compiler.
2021-08-26 16:48:25 -07:00
Doug Gregor
602937d06c Clean up build-script test failures and linter errors 2021-08-26 08:49:44 -07:00
Doug Gregor
f2995a3755 Optionally build the compiler and _Concurrency library for back deployment.
When enabling the build of the back-deployable concurrency library via
the build-script option `--back-deploy-concurrency`, also build the
compiler and (main) concurrency library to support older deployment targets.

Building the compiler for older deployment targets is effectively the
same as implicitly passing
`-Xfrontend -enable-experimental-back-deploy-concurrency`. That option
should probably go away.

Building the primary _Concurrency library for back-deployment means
setting the "SwiftStdlib 5.5" availability back to the earlier
deployment targets. This should have no effect on how the _Concurrency
library binary is built, but it does ensure that the right
availability annotations are in the _Concurrency module.
2021-08-26 08:49:44 -07:00
Doug Gregor
3f749dc13b Add an option to build the concurrency library for back deployment.
Introduce an additional build product to build-script to build
back-deployable concurrency libraries. These libraries would need to
be embedded in apps deployed prior to macOS 12/iOS 15 to support
concurrency.

The built-script option `--back-deploy-concurrency` can be provided to
build these back-deployment libraries. They are built in addition to
the normal concurrency libraries, as a separate product that installs
into `lib/swift-5.5/<platform>` within the toolchain. The macro
`SWIFT_CONCURRENCY_BACK_DEPLOYMENT` is set when building the
concurrency library, so that we can adapt the implementation to older
OS's.
2021-08-26 08:49:43 -07:00
Michael Gottesman
15aff43980 Revert "Revert "[build-script] Use a builder to setup pass pipelines that are then scheduled when using --infer""
This reverts commit 7348395a30.
2021-08-25 19:31:29 -07:00
Mishal Shah
7348395a30 Revert "[build-script] Use a builder to setup pass pipelines that are then scheduled when using --infer" 2021-08-18 08:34:18 -07:00
Michael Gottesman
6d50463656 [build-script] Use a builder to setup pass pipelines that are then scheduled when using --infer
The key thing here is that by using this builder, I am going to be able to split
the build-script-impl pipeline in two and put in a build-script pipeline in
between. This is needed so that on Linux, we can build the stage 2 compiler
before we build any of the build-script-impl libraries that depend on having a
swift compiler.

This should be an NFCI change. I am relying on our build system unit tests to
ensure that I am not changing any real behavior.
2021-08-17 19:54:03 -07:00
Butta
9d1736c123 [build] Add flags to allow skipping rebuilding the corelibs
Add three new flags, '--skip-clean-libdispatch', '--skip-clean-foundation', and
'--skip-clean-xctest', that leave the previous builds of those products in place.
2021-08-16 17:19:56 +05:30
Michael Gottesman
c86e3af454 [build-script] Refactor out BuildScriptInvocation into its own file and out of the top level build-script file.
This shrinks the number of lines in build-script by 50% and just makes it easier
to read. It will also enable me to refactor parts of it into pieces without
touching the main build-script file. This is really library code... build-script
itself doesn't care about how BuildScriptInvocation is actually implemented
under the hood.
2021-08-15 20:01:58 -07:00
Michael Gottesman
04adce1541 Merge pull request #38853 from gottesmm/pr-d8c550901b98bd6c923d361cead9546d950350b9
[build-script] Specify CMAKE_RANLIB when building a CMakeProduct.
2021-08-12 16:03:21 -07:00
Michael Gottesman
db01f33d88 [build-script] Specify CMAKE_RANLIB when building a CMakeProduct.
When I perform the stage2 build, the first C-libdispatch seems to require this.
2021-08-12 11:45:17 -07:00
Eric Miotto
3ebb554690 [build] Restore previous semantics of stdlib-deployment-targets test (#38848)
For historical reasons, we configure and build standard library targets
differently depending on whether `stdlib-deployment-targets` is no set or set to
`[]`.

Add a test to make this need more explicit.

Addresses rdar://81651877
2021-08-12 07:08:30 -07:00
Michael Gottesman
2333cbcf21 [cmark] Start always cross compiling cmark on Linux. 2021-08-08 20:31:41 -07:00
Michael Gottesman
d0ad980931 [build-script] Implement setattr on StageArgs.
In case people want to override staged args in funky ways.
2021-08-05 14:54:41 -07:00
Michael Gottesman
c3d094074a [build-script] Make sure that StageArgs are never passed a StageArgs as their args.
No good reason to do this and simplifies the state space.
2021-08-05 14:08:26 -07:00
Michael Gottesman
719b112bce [build-script] Add is_verbose support to cmake_product. 2021-08-04 13:43:11 -07:00
Michael Gottesman
ae6714f2e5 [build-script] Update host specific configuration to handle multiple stage compilers.
The key thing here is that certain options (such as the stdlib deployment
targets and what to build/test) now use stage_dependent_args meaning that when
we us a stage2 compiler we will automagically look up the same argument name,
but with '_stage2' as a postfix.
2021-08-04 13:43:11 -07:00
Michael Gottesman
18f84f266d [build-script] Introduce infrastructure for auto-prefixing stage2 options.
This will let me introduce a stage generic swift implementation that adds a
postfix '_stage2' to certain stage specific options. This ensures we can have a
single swift build-script product implementation for both stage1 and stage2
compilers.
2021-08-04 13:30:40 -07:00
Michael Gottesman
c7001f91d8 [build-script] Provide infrastructure for CMakeProduct subclasses to opt into using the just built swift toolchain. 2021-08-04 13:30:40 -07:00
Eric Miotto
3504310fee [build] ensure benchmark toolchain tests use the just built libraries (#38158)
The binaries would prefer the dylibs shipped in the OS to the ones just built -- employ `DYLD_LIBRARY_PATH` to pick up the latter instead.

The main purpose of this change is to unblock the generation of nightly
toolchains.

Addresses rdar://79788142
2021-07-07 07:10:51 -07:00
Varun Gandhi
a07b4761b3 Merge pull request #33724 from buttaface/core
[build] Add the flags to enable cross-compiling the corelibs
2021-06-30 09:31:51 -07:00
Michael Gottesman
d829de1e25 [build-script] Use a toolchain file and always cross compile cmark.
NOTE: We still build for the host platform always, but even in that case within
cmark itself, we are cross compiling it.
2021-06-28 19:26:10 -07:00
Butta
a4ff4db508 [build] Add the flags to enable cross-compiling the corelibs
Pass the Swift and CMake flags needed to cross-compile Foundation and so on, with
the first example of Android. Add a new flag, --cross-compile-deps-path, which is
used to search for cross-compiled libraries, like libcurl, that the corelibs
depend on. Also add a new flag, --common-swift-flags, to pass additional Swift
flags to the corelibs.
2021-06-29 06:41:41 +05:30
Mishal Shah
d914ac25ee Update the macOS arch list to x86_64 and arm64 2021-06-15 23:02:02 -07:00
Dario Rexin
7ca2301841 Merge pull request #37852 from drexin/wip-fix-skip-test-cmark
[Build] Fix --skip-test-cmark
2021-06-11 14:04:15 -07:00
swift-ci
a61eb7e72b Merge pull request #37855 from adrian-prantl/typo 2021-06-10 17:29:44 -07:00
Dario Rexin
ca5e721857 [Build] Fix name of EarlySwiftDriverTestCase (#37853) 2021-06-10 09:43:42 -07:00
Adrian Prantl
63ab220d71 Fix typo 2021-06-09 15:37:47 -07:00
Dario Rexin
4d71ffaccd [Build] Add tests for CMark.should_test 2021-06-09 14:08:41 -07:00
Dario Rexin
3331529f4c [Build] Fix --skip-test-cmark
rdar://79094449
2021-06-09 13:45:37 -07:00