Commit Graph

1333 Commits

Author SHA1 Message Date
Ben Langmuir
8eed9260de Merge pull request #22346 from benlangmuir/libcxx
[build-script] Add Product for libc++
2019-02-04 14:40:35 -08:00
Ben Langmuir
80b6b3abca Conditionalize libc++ installation 2019-02-04 13:21:18 -08:00
Xi Ge
29a4ca8519 cmake: allow SwiftSyntax parser to have an externally defined version number in the dylib 2019-02-04 10:55:39 -08:00
Xi Ge
035f32868d build-script: teach the script to extract symbols when building libSyntax parser only. 2019-02-01 13:52:34 -08:00
Saleem Abdulrasool
58cc900484 Merge pull request #22228 from compnerd/cmake-is-hard
utils: simplify the lldb build-script-impl invocation
2019-01-30 16:55:52 -08:00
Saleem Abdulrasool
b3b9de7242 utils: simplify the lldb build-script-impl invocation
Merge the cmake invocation for lldb on MacOS and the other targets.
2019-01-30 14:05:38 -08:00
Alex Lorenz
78d759ad69 Merge pull request #22184 from hyp/buildInstallClangAndClangd
Build and install 'clang' and 'clangd' in the macOS & linux toolchains
2019-01-30 12:07:51 -08:00
Xi Ge
283de9f997 Merge pull request #22220 from nkcsgexi/xcbuild-ss-flag
build-script: add a flag to skip building/installing swift-syntax's swift side
2019-01-29 15:36:32 -08:00
Xi Ge
b944b683de build-script: add a flag to skip building/installing swift-syntax's swift side artifacts. 2019-01-29 14:44:40 -08:00
Saleem Abdulrasool
f199222d97 utils: remove LLDB_PATH_TO_CMARK_BUILD
This has been removed from the lldb build, so we no longer need to pass
this along to lldb's CMake invocation.
2019-01-29 10:40:58 -08:00
Alex Lorenz
1941aaa0d6 Build and install 'clang' and 'clangd' in the macOS & linux toolchains
- Build script now builds clang_tools_extra as part of LLVM's build.
- Build script now has a new libc++ build step to allow libc++ headers to be installed in the
  resulting toolchain.
- 'clang', 'clangd', 'clang-headers' & 'compiler-rt' targets are now installed for
  the package build configurations for macOS and linux.
- 'clang-resource-dir-symlink' is used in the package build configuration for macOS and linux
  to avoid duplication of Clang's headers and compiler-rt archives.

rdar://24912710
2019-01-28 17:16:12 -08:00
Ben Langmuir
2d5fbb9f18 Re-apply "Set a reasonable default for SWIFT_INSTALL_COMPONENTS"
This reverts commit 77689f5945 (#22079)
2019-01-28 16:25:58 -08:00
Saleem Abdulrasool
1807aa32a2 build-script-impl: collapse similar cases
Collapse the various lldb build configuration into a single one where
the invocation is exactly the same.  NFC.
2019-01-25 18:02:06 -08:00
Xi Ge
c2befddc5d build-script: create SwiftSyntax install directory if it doesn't exist.
We may install SwiftSyntax to other places instead of the just-built toolchain, so
this change is necessary.
2019-01-25 13:42:46 -08:00
Ben Langmuir
dc2ea3ebbb Merge pull request #21772 from benlangmuir/no-legacy-rebase
[build-script] Turn on --no-legacy-impl by default
2019-01-24 09:14:41 -08:00
Xi Ge
ff0d764ec9 Merge pull request #22073 from nkcsgexi/PGO-swift
cmake: allow building the Swift compiler with Clang's Profile Guided Optimization (PGO)
2019-01-23 20:02:41 -08:00
Jordan Rose
77689f5945 Revert "Set a reasonable default for SWIFT_INSTALL_COMPONENTS" (#22079) 2019-01-23 19:35:09 -08:00
Xi Ge
018799cd6c cmake: allow building the Swift compiler with Clang's Profile Guided Optimization (PGO)
Previously, Build script flag --clang-profile-instr-use is only used for building
clang and llvm. This patch extends PGO to the building of the Swift compiler.
2019-01-23 18:02:43 -08:00
Xi Ge
43e7801606 build-script: install libParser header files to destination. 2019-01-22 15:48:08 -08:00
Ben Langmuir
5dbe28bf13 Update for feedback 2019-01-22 15:37:50 -08:00
Ben Langmuir
5619138a10 [build-script] Turn on --no-legacy-impl by default
Turns on the `--no-legacy-impl` option to build-script by default; the
old behaviour is temporarily still available as `--legacy-impl`.

This causes build-script to invoke build-script-impl for every
individual build/test/install/etc. action rather than a single global
invocation. For example, a single invocation might be for
`macosx-swift-install`. This will enable the python code in build-script
to drive the overall process and add additional steps in between actions
without the involvement of build-script-impl. It also provides a path to
refactoring the existing actions out of build-script-impl individually.

Discussed as part of https://forums.swift.org/t/rfc-building-swift-packages-in-build-script/18920

The --no-legacy-impl flag was originally disabled by default because of
concerns about the performance of null builds due to the increased
number of script invocations. There is a small optimization in this
commit to use `tr` when processing command-line options instead of
bash's builtin substitution, which eliminates most of the overhead.
After this change, a null build of llvm+swift changes from 1.6 s to
2.1 s on Linux, and from 5 s to 6 s on macOS.  Non-null builds and
builds that involve more build products than just llvm+swift (e.g.
corelibs) are basically unaffected since they are not correctly
incremental to begin with.

The changes to build-script-impl in this commit are to fix the behaviour
of --no-legacy-impl, which had bitrotted since it was introduced. These
changes are to make various parts of the script not rely on variables
defined in "earlier" parts of the script, which is good hygiene in
general.
2019-01-22 15:37:50 -08:00
Xi Ge
ced5044991 build-script: add a flag to separately install SwiftSyntax artifacts.
This flag '--swiftsyntax-install-prefix' could be used in the preset mode
to specify an installation dir. If we are building SwiftSyntax without building
the rest of the compiler, we'll install the SwiftSyntax modules and dylibs
with lib_InternalSwiftSyntaxParser.dylib to the given directory directly, ignoring
the conventional toolchain locations.
2019-01-22 11:59:39 -08:00
Xi Ge
eefa0b1595 build-script: add a flag to build libSwiftSyntaxParser only. 2019-01-17 16:05:46 -08:00
Ben Langmuir
d685728d4a Merge pull request #21886 from benlangmuir/install-components-default
Set a reasonable default for SWIFT_INSTALL_COMPONENTS
2019-01-17 10:12:44 -08:00
adrian-prantl
6914e6e411 Merge pull request #21935 from adrian-prantl/speedup-compat
Add a lit regex filter for the compatibility tests
2019-01-16 16:05:44 -08:00
Ben Langmuir
aac60468a2 Set a reasonable default for SWIFT_INSTALL_COMPONENTS
Previously, build-script-impl would set this to "" by default, resulting
in nothing being installed with --install-swift unless you explicitly
set --swift-install-components as well.  Now we defer to cmake by
default.

On the cmake side, change the default value to exclude
* dev - uses a lot of disk space and usually not something you want to
  install into a toolchain
* clang-resource-dir-symlink & clang-builtin-headers-in-clang-resource-dir -
  these are mutually exclusive with clang-builtin-headers
* sourcekit inproc/xpc - these are currently mutually exclusive, so pick
  the best one for the current platform.
2019-01-16 14:48:02 -08:00
Adrian Prantl
7967ec19b6 Add a lit regex filter for the compatibility tests
This speeds up the invocation since only a single test matches the
category and otherwise non-dotest.py tests would be run twice.
2019-01-16 14:40:53 -08:00
Argyrios Kyrtzidis
7a383f4b1d [build-script-impl] Pass search paths for the syntax parser library to the stress-tester build
Fixes rdar://47265256
2019-01-14 16:52:33 -08:00
Adrian Prantl
622753daa4 Fix more shell syntax errors in the LLDB asan configuration 2019-01-14 09:48:50 -08:00
swift-ci
41ac9ca002 Merge pull request #21806 from adrian-prantl/LLVM_LIT_ARGS 2019-01-11 18:34:57 -08:00
Adrian Prantl
94c2e467fb Simplify build-script: LLVM_LIT_ARGS is already being added to cmake_options. 2019-01-11 15:06:11 -08:00
adrian-prantl
908646f9ca Merge pull request #21801 from adrian-prantl/lit
[build-script] Pass LLVM_LIT_ARGS to llvm-lit
2019-01-11 12:59:50 -08:00
Adrian Prantl
a7f2f1b497 [build-script] Pass LLVM_LIT_ARGS to llvm-lit 2019-01-11 12:07:51 -08:00
Argyrios Kyrtzidis
9c0403761d Merge pull request #21762 from akyrtzi/syntax-parser-clib
Introduce C parser library
2019-01-11 11:19:50 -08:00
Adrian Prantl
59ddf34cee Fix a syntax error in build script 2019-01-11 08:20:31 -08:00
Argyrios Kyrtzidis
70c954e1ea [utils/build-script-impl] Pass header/lib paths to the syntax parser library for the build-script invocation of SwiftSyntax 2019-01-10 18:52:37 -08:00
Adrian Prantl
1db8e37f0d Limit the number of concurrent LLDB tests running in the asan configuration. 2019-01-10 12:38:50 -08:00
Brent Royal-Gordon
9dd5d1293c Rework swift-stress-tester repo building (#21523)
This change makes build-script-impl use a new, shared version of swift-stress-tester’s build-script-helper.py which also supports building swift-evolve. It also adds the necessary flags and variables to build swift-evolve from build-script.
2019-01-09 14:03:35 -08:00
Mishal Shah
ba2233d248 Update the toolchain plist by moving SWIFT_USE_DEVELOPMENT_TOOLCHAIN_RUNTIME into OverrideBuildSettings 2018-12-18 18:14:52 -08:00
Saleem Abdulrasool
69e2018806 build-script: build static version of Foundation
Build and install Foundation static.  We now build Foundation using
CMake, which does not easily generate static and shared versions of
libraries.  Create two builds to populate the toolchain
distribution.
2018-11-28 10:12:19 -08:00
Saleem Abdulrasool
81321b57a4 build-script: build static version of libdispatch
build and install libdispatch static.  We now build libdispatch using
CMake, which does not easily generate static and shared versions of
libraries.  Create two builds to populate the toolchain distribution.
2018-11-27 11:51:26 -08:00
swift-ci
ac8b89abb5 Merge pull request #20082 from drodriguez/android-aarch64-build-script 2018-11-26 19:34:24 -08:00
Mishal Shah
e7481cc0cd Update the plist to use DefaultBuildSettings not OverrideBuildSettings for SWIFT_USE_DEVELOPMENT_TOOLCHAIN_RUNTIME 2018-11-14 13:44:46 -08:00
Mishal Shah
cfd3c52b6f Update the plist information for swift toolchains
rdar://45197621
2018-11-14 12:43:48 -08:00
Mishal Shah
bae265e308 Revert "Revert "[build-script] Update build-script to support building and installing the SourceKit stress tester"" 2018-11-12 11:08:36 -08:00
Mishal Shah
e7d501c2bd Revert "[build-script] Update build-script to support building and installing the SourceKit stress tester" 2018-11-11 17:49:35 -08:00
Nathan Hawes
506307c626 [build-script] Update build-script with a new --skstresstester flag to support building and installing the SourceKit stress tester
This makes use of a helper script in the stress tester repo to do the actual
build and install: https://github.com/apple/swift-stress-tester/blob/master/SourceKitStressTester/Utilities/build-script-helper.py
2018-11-07 09:14:39 -08:00
Saleem Abdulrasool
14dbc9ae14 Merge pull request #20329 from compnerd/frameworks
build: pass the framework path to the importer
2018-11-06 00:11:20 -08:00
swift-ci
2c9616f9c0 Merge pull request #20330 from nkcsgexi/install-swiftsyntax 2018-11-05 21:56:42 -08:00
Saleem Abdulrasool
a94f317857 build: adjust rpath, don't pass -F to the link
Pass the framework only to the importer as `-F` on ELF is used for the
`DT_FILTER`.  Adjust the `DT_RUNPATH` so that the dependent libraries are found.
2018-11-05 14:25:12 -08:00