Commit Graph

1333 Commits

Author SHA1 Message Date
Dave Lee
562a254dde expand comment to explain user overrides 2020-06-17 15:03:28 -07:00
Doug Gregor
e06bccdb65 [build-script] Don't hardcode sqlite3 location; use the SDK. 2020-06-17 10:28:06 -07:00
Dave Lee
c71ed97888 [build-script] Prioritize SDK paths in CMake find_ functions 2020-06-17 09:59:58 -07:00
Michael Gottesman
452b6dd08f [build-script-impl] Require --install-llvm to be passed in to install llvm.
Before this patch, we assumed that if LLVM_INSTALL_COMPONENTS was non-empty that
we wanted to install llvm. This is different than /every other/ product in
build-script-impl where INSTALL_$PRODUCT controls if an install is attempted. If
a components sort of thing is required, we force it to only be a configuration
of an option that is a no-op if INSTALL_$PRODUCT is set to true.

I went through build-presets and looked at every place we had an install
statement and added install-llvm when appropriate. This was generally when we
did an install-swift. The one special case is with the tsan_libdsipatch
test. That being said, if I was too aggressive with where I put these
install-llvm, no harm will result since in those cases LLVM_INSTALL_COMPONENTS
had to be empty previously anyways (since otherwise we would have attempted an
install).
2020-06-08 14:11:32 -07:00
Adrian Prantl
6ec007a003 Further reduce the number of parallel jobs when testiong LLDB under ASAN 2020-05-21 10:52:10 -07:00
Michael Gottesman
2b2b5b8f08 [benchmarks] Remove cmake based external perf testsuite build.
If we do an external benchmark build, we will do it via the toolchain benchmark
build-script job. This will be simpler by allowing us to build against a just
built toolchain and separate us from the rest of swift's main CMakeLists.txt.
2020-05-10 14:16:14 -07:00
Michael Gottesman
edfbf57de2 [build-script] On non-Darwin build lld by default.
This will let us use lld to link the stdlib. This will allow us to
avoid problems due to old compilers being used on certain older distributions
that we support.

If anyone wants to not build lld, they can just pass to build-script-impl
--skip-build-lld
2020-05-07 17:42:58 -07:00
Max Desiatov
70e86c3633 [NFC] Fix comment typo in build-script-impl 2020-04-30 19:24:39 +01:00
Eric Miotto
b309c62a75 [build] set CMAKE_OSX_ARCHITECTURES in swift_cmake_options (#31414)
This augments #31023 to make sure CMake invokes the compiler checks
correctly -- this is needed to avoid errors in certain
configurations.

Addresses rdar://62339814
2020-04-30 09:34:36 -07:00
Butta
16d599ecfa [build-script-impl] Allow cross-compiling the host toolchain for Android 2020-04-21 15:53:32 +05:30
Davide Italiano
6e6761e4c4 Merge pull request #31023 from apple/also-swift-needs-that
[build-script] Pass CMAKE_OSX_SYSROOT to swift_cmake_options too.
2020-04-15 12:00:59 -07:00
Mishal Shah
050123283b Merge pull request #31012 from apple/shahmishal/drop-swift-api-digester-dsym
Disable creating swift-api-digester dSYM to reduce toolchain size
2020-04-14 17:44:01 -07:00
Davide Italiano
e60fe92f61 [build-script] Pass CMAKE_OSX_SYSROOT to swift_cmake_options too. 2020-04-14 13:27:40 -07:00
Mishal Shah
0f5bdb4949 Add a comment for removing debug symbols for swift-api-digester from the toolchain 2020-04-14 10:51:44 -07:00
Mishal Shah
9ae46a3473 Disable creating swift-api-digester dSYM to reduce toolchain size 2020-04-14 09:30:50 -07:00
Saleem Abdulrasool
fa6bedeccd build: explicitly pass the path to python2,python3
Explicitly pass the path to the python interpreter on macOS by using
`xcrun` to find the tools.
2020-04-13 20:29:29 -07:00
Robert Widmann
22b0526917 Merge pull request #30082 from 3405691582/OpenBSD_Port_Build
Build system recognizes OpenBSD.
2020-04-12 09:30:17 -07:00
Doug Gregor
044613a13b [build-script] Add -simulator to simulator target triples. 2020-04-06 16:52:56 -07:00
3405691582
f8d0174b85 Build system recognizes OpenBSD.
Commit for CMake and build scripts to recognize OpenBSD. To keep this
commit relatively short, this just deals with the rather simple and
uncontroversial changes to the build system.

Note that OpenBSD calls "x86_64" as "amd64", Since the Swift stdlib will
be put in a subdirectory named after ARCH, to ensure the standard
library is properly found later, we use the native architecture name for
OpenBSD in the build system rather than trying to deal with the
difference the other way around.
2020-04-03 13:34:17 -04:00
Fred Riss
a4c5671a5f [build-script-impl] Pass host tools to LLDB's Cmake when cross-compiling 2020-03-27 13:41:26 -07:00
Adrian Prantl
7d699120b4 build-script: Avoid re-runnning the entire LLDB test suite twice. 2020-03-13 16:32:46 -07:00
Adrian Prantl
e676286c97 build-script: Rerun all lldb Swift tests with DWARFImporter.
rdar://problem/57880844
2020-03-12 19:34:23 -07:00
Kuba (Brecka) Mracek
ab6533a40f Merge branch 'master' into mracek/arm64e 2020-03-06 15:07:01 -08:00
Davide Italiano
af29f5dd3a [build-script] Allow primary-variant-arch and primary-variant-sdk to be set independently.
It's unclear why they're grouped, and it's also confusing.
2020-03-04 12:31:43 -08:00
Kuba Mracek
45ba5cec05 [arm64e] Add arm64e support into Swift's build system 2020-02-27 16:08:15 -08:00
Daniel Rodríguez Troitiño
073e44d6e8 Merge pull request #29296 from buttaface/droid
[android] Get build scripts working natively, fix tests and install
2020-02-24 21:05:47 -08:00
Saleem Abdulrasool
dd02e2ae8a build: add more paths for LLDB tests
Alter the test paths for LLDB to enable restructuring the Foundation
sources to be easier for new developers.
2020-02-12 19:45:30 -08:00
Saleem Abdulrasool
8d32ee36fc Merge pull request #29443 from compnerd/unsupported-playground-support
build: migrate playground support to post-build artifact
2020-02-12 11:28:03 -08:00
Michael Gottesman
f352660a09 [build-script-impl] By default use the just built dsymutil to ensure that when we use the newer LLVM, the dsymutil supports newer debug info.
This can be disabled via the build-script-impl flag:

darwin-install-extract-symbols-use-just-built-dsymutil
2020-02-08 16:26:06 -08:00
Saleem Abdulrasool
f4086d8428 build: migrate playground support to post-build artifact
This migrates the playground support out of the build-script-impl and
into the python based build system.  This makes it build more similarly
to the Swift Package Manager and SourceKit-LSP.  More importantly, it
reduces the dependency on build-script-impl.
2020-02-08 14:00:02 -08:00
Butta
3f4109b3a2 [android] Get build scripts working natively, fix tests and install
The build scripts assume Android cross-compilation using the NDK, so avoid
that configuration if building on an Android host. Fix or disable some tests,
and don't install a glibc.modulemap without a native sysroot prefix.
2020-02-05 11:36:33 +05:30
swift-ci
f4be6e803f Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-31 21:43:05 -08:00
Saleem Abdulrasool
6b9c570b38 build: correct the handling for the static variants
The static variants should use the same flags as the dynamic variants.
We missed the name conversion in the variable computation causing the
static and dynamic builds to diverge.
2020-01-31 15:54:37 -08:00
swift-ci
ffb289cc19 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-28 17:24:11 -08:00
Andrew Trick
4a123f102e Fix the build-script --skip-build option.
This option configures the build directories without building any
targets. Splitting configuration from build allows for the decoupling
of build products. This decoupling is essential for the enlightened
way of developing Swift where the build-script is never actually used
to build anything, and build products can be independently
configured. When fully supported, this avoids many unnecessary
full/clean rebuilds and enables debugging by mixing-and-matching
configurations and rebuilding only select products after a change.

Sadly, the option has degraded, and a recent commit rendered it fully broken:

  commit 34848e6026
  Author: Alex Langford <apl@fb.com>
  Date:   Wed Jan 22 19:27:44 2020

    [build] Unify logic to skip building projects in build-script-impl

The breaking commit was itself a reasonable cleanup. The underlying
problem was the original --skip-build was implemented using hacks that
conflated configuration with build.

This fix reinstates a reasonable situation:

--skip-build has no effect on configuration, as documented. It merely
  skips building the targets. This is how it must behave to work as
  intended.

--skip-build-{product} and its inverse --build-{product} controls
  which products will be configured. These options are in heavy use
  throughout the scripts, so changing the name (e.g. to --skip-config)
  would be disruptive and of questionable benefit.

None of this changes the fact that any required build logic that
people have dumped into build-script-impl still effectively breaks the
enlightened way of building Swift, particularly when building
toolchain components.
2020-01-28 13:09:08 -08:00
swift-ci
b0d3f3a13c Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-23 14:24:57 -08:00
Saleem Abdulrasool
35e3371ae1 Merge pull request #28960 from compnerd/static-dispatch
build: simplify handling for static variants (NFC)
2020-01-23 14:07:27 -08:00
swift-ci
85409a3fa6 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-23 12:43:48 -08:00
Saleem Abdulrasool
0c5f1ee829 Merge pull request #29373 from xiaobai/the-other-half
[build] Unify logic to skip building projects in build-script-impl
2020-01-23 12:43:12 -08:00
swift-ci
f8d0c67d28 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-23 08:24:33 -08:00
Saleem Abdulrasool
ca1bb6ff2e build: simplify handling for static variants (NFC)
There is no need to special case the products for the static build.
This handles `libdispatch_static` and `foundation_static` more
generically.
2020-01-23 08:17:59 -08:00
Saleem Abdulrasool
4356e95c3b Merge pull request #29371 from compnerd/bs-dead-variables
build: cleanup unreferenced CMake variables
2020-01-23 08:14:29 -08:00
Alex Langford
34848e6026 [build] Unify logic to skip building projects in build-script-impl 2020-01-22 19:27:44 -08:00
Saleem Abdulrasool
a3a88dd16e build: cleanup unreferenced CMake variables
`SWIFT_CMARK_LIBRARY_DIR` is not referenced in the build, remove the
variable.
2020-01-22 17:03:24 -08:00
swift-ci
4f70459a19 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-22 16:03:39 -08:00
Saleem Abdulrasool
f1ef08af7c Merge pull request #29363 from compnerd/bs-check
build-script: reduce duplication of check
2020-01-22 15:45:14 -08:00
swift-ci
b068ea573f Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-22 14:24:40 -08:00
Saleem Abdulrasool
53c7bb0fbc build-script: reduce duplication of check
This hoists the shared check to the beginning of the product
installation phase.  This can be done as a shared phase option.  In
theory it should be possible to hoist this further to a single check at
the beginning of the phase.
2020-01-22 13:40:58 -08:00
swift-ci
ab775d127f Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-22 08:24:34 -08:00
Saleem Abdulrasool
45af79d1a3 build-script: generate options (NFC)
Rather than individually list the options, generate the options which
ensures that options are more uniform and makes it easier to alter them
globally.
2020-01-22 08:23:41 -08:00