Commit Graph

968 Commits

Author SHA1 Message Date
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
Alex Hoppen
c4814cbdbe [build-script] Pass updated arguments to SwiftSyntax's build script
This fixes an issue that caused SwiftSyntax's module to not be properly
installed.
2019-10-07 16:54:29 -07:00
Mike Ash
afb904f962 [build-script-impl] Echo commands that are executed when in verbose mode. 2019-10-07 10:14:51 -04:00
Mike Ash
91c95019c1 [build-script-impl] Handle multiple version directories in TOOLCHAIN/usr/lib/clang.
This ensures that compiler-rt gets copied across even if there's more than one version listed.

rdar://problem/55974236
2019-10-07 10:14:19 -04:00
Davide Italiano
33770fa665 Merge pull request #27526 from dcci/openupyoureyes
[build-script-impl] Fix cross-compilation of swift.
2019-10-03 13:59:39 -07:00
Davide Italiano
0996da0ed2 [build-script-impl] Fix cross-compilation of swift.
Swift requires now tablegen to build Options.inc, so build script
has to be taught about picking the host llvm-tablegen instead of
the target llvm-tablegen.

<rdar://problem/55916729>
2019-10-03 11:54:43 -07:00
Saleem Abdulrasool
c7d80f202d build: stage libdispatch exports target usage
Pass `dispatch_DIR` which will replace *_PATH_TO_LIBDISPATCH_SOURCE and
*_PATH_TO_LIBDISPATCH_BUILD.
2019-10-03 08:51:47 -07:00
swift-ci
829df919a9 Merge pull request #27459 from compnerd/xctest-build-type 2019-10-01 10:57:11 -07:00
Saleem Abdulrasool
a9a178cdd1 build: correct the build type for XCTest
Use the correct variable for the build type for XCTest.  We would
previously use the build type specified for dispatch to build XCTest.
2019-10-01 08:48:42 -07:00
swift-ci
e901234d1b Merge remote-tracking branch 'origin/master' into master-rebranch 2019-09-30 08:03:50 -07:00
Saleem Abdulrasool
ce5295b360 build-script: new spelling for swift compiler 2019-09-29 15:46:28 -07:00
Adrian Prantl
9b6ff03f9e On Linux build LLVM and subprojects with -gsplit-dwarf which is more space/time
efficient than -g on that platform. This improves time spent to link products
built with debug info quite a bit.
2019-09-27 13:41:02 -07:00
Jonas Devlieghere
6e6de9eba3 [build-script] Pass LLDB_EXTRA_CMAKE_ARGS last
Pass LLDB_EXTRA_CMAKE_ARGS last so it can override defaults values set
earlier. It also makes sure we only pass LLDB_USE_SYSTEM_DEBUGSERVER
when the corresponding build-script flag is set.
2019-09-25 16:45:53 -07:00
Jonas Devlieghere
3f669d1b86 Don't quote DOTEST_EXTRA as they're part of a CMake list
Even though the dotest extra arguments can contain multiple flags, we
shouldn't quote them because they're passed as a list to CMake. This
also fixes the check above which was inspecting the wrong variable.
2019-09-24 10:08:02 -07:00
Fred Riss
40721a80f8 build-script-impl: Fix passing extra args to dotest
The quotes around the arguments were not escaped properly.
2019-09-23 20:44:21 -07:00
swift-ci
7fd3cd647e Merge remote-tracking branch 'origin/master' into master-rebranch 2019-09-21 06:04:30 -07:00
Saleem Abdulrasool
ba3a3a7561 build: try harder to pass along CMAKE_Swift_COMPILER
This is needed for the CMake 3.15 based build.
2019-09-20 11:11:19 -07:00
swift-ci
5027c23664 Merge remote-tracking branch 'origin/master' into master-rebranch 2019-09-20 08:43:03 -07:00
Jonas Devlieghere
bd75e34fc3 [build-script] Don't override the LLDB codesign idenity.
Overriding the code sign identity in build script makes no sense.
2019-09-18 17:55:43 -07:00
Saleem Abdulrasool
42f350b682 utils: pass CMAKE_Swift_COMPILER
This is the variable that the official CMake Swift support uses.  Define
this so that we can be forward compatible with CMake 3.15.
2019-09-18 17:47:18 -07:00
Jonas Devlieghere
ed30b9f247 [build-script] Fix issue with DOTEST_ARGS for LLDB.
LLDB expects the DOTEST_ARGS CMake variable to be a list with entries
separated by semicolons.

(cherry picked from commit 1544a4718e)
2019-08-26 15:39:46 -07:00
Jonas Devlieghere
d83a17fe07 [build-script] Move dotest arguments up to the configuration phase.
Rather than constructing the dotest arguments at test-time, we should
build them at configuration time and have CMake know about them. That
way you can run check-lldb in the LLDB build directory and have the same
behavior compared to running the test suite with build script.

(cherry picked from commit 5b5b5d532a)
2019-08-23 16:05:45 -07:00
Jonas Devlieghere
d7f830d1ca [build-script] Remove LLDB_DOTEST_CC_OPTS.
This variable is set but never used. The right way to set the test
compiler is by setting the corresponding CMake variables. This is likely
a remnant of the Xcode project support.

(cherry picked from commit 9c690e36e3)
2019-08-23 16:05:45 -07:00
Jonas Devlieghere
dfd2e18100 [build-script] Remove LLDB_FORMATTER_OPTS
This variable is set but never used. Since we run the test suite with
lit these don't matter at all.

(cherry picked from commit a83a40f7b5)
2019-08-23 16:05:45 -07:00
Jonas Devlieghere
101808120f [build-script] Cleanup the LLDB test phase
This removes some redundant code from the LLDB test phase and simplifies
the remaining code. This is the first step in moving the test arguments
up to the CMake configuration phase, so we can just run check-lldb.

(cherry picked from commit 825a39abb3)
2019-08-23 14:13:17 -07:00
Davide Italiano
1091f197fe [WIP] Fix LLDB.framework install path in build-script.
(cherry picked from commit 3dc011b0bb)
2019-08-23 14:13:17 -07:00
Jonas Devlieghere
648af5e2d6 [build-script] Pass Swift_DIR to standalone LLDB build
Upstream we changed the LLDB standalone build to use LLVM_DIR and
Clang_DIR to find LLVM and Clang respectively. This commit does the same
for Swift, making everything use Swift_DIR instead of our hand-rolled
variables.

(cherry picked from commit 0f3f54cc55)
2019-08-23 14:13:17 -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
Stefan Graenitz
61b9d499d9 [CMake] Fix linux cache name: Apple-lldb-Linux.cmake
(cherry picked from commit d534de5492)
2019-08-23 14:13:17 -07:00
Jonas Devlieghere
39821adf5a [build-script] Add Swift_DIR again to LLDB CMake invocation. 2019-08-23 09:51:38 -07:00
swift-ci
7b38b5ac04 Merge remote-tracking branch 'origin/master' into master-rebranch 2019-08-22 16:23:49 -07:00
Alex Langford
61be4d969f [CMake][NFC] Introduce component targets for proper dependency tracking
This commit introduces a CMake target for each component, adds install targets
for them, and switches build-script-impl to use the target `install-components`
for installation. Each of the targets for each component depends on each
of the individual targets and outputs that are associated with the
corresponding swift-component.

This is equivalent to what already exists, because right now install rules are
only generated for components that we want to install. Therefore, this commit
should be an NFC.

This is a resubmission (with modifications) of an earlier change. I originally
committed this but there were problems with some installation rules.
2019-08-22 10:16:50 -07:00
swift-ci
00788e519c Merge remote-tracking branch 'origin/master' into master-rebranch 2019-08-14 15:44:18 -07:00
Ross Bayer
cc92f5283f [Build System: build-script-impl] Ignore Python scripts when running dsymutil on executables and shared libraries. 2019-08-14 14:07:56 -07:00
swift-ci
cc3959f3d8 Merge remote-tracking branch 'origin/master' into master-rebranch 2019-08-12 16:44:03 -07:00
Julian Lettner
806b3bfd31 Merge pull request #26620 from apple/libdispatch_static_cmake_options_fixup
[build-script] Propagate libdispatch-cmake-options
2019-08-12 16:28:32 -07:00
Julian Lettner
5579118c97 [build-script] Propagate libdispatch-cmake-options
PR #25085 [1] enabled building and installing the static variant of the
libdispatch library in build-script-impl. This broke the
`tsan-libdispatch-test` preset [2].

Let's make sure we pass along the options specified in
`libdispatch-cmake-options` when building the static variant.

[1] https://github.com/apple/swift/pull/25085
[2] https://github.com/apple/swift/pull/24330

rdar://problem/49177823
2019-08-12 13:39:13 -07:00
swift-ci
917c6653a1 Merge remote-tracking branch 'origin/master' into master-rebranch 2019-08-12 13:23:30 -07:00
Davide Italiano
3dc011b0bb [WIP] Fix LLDB.framework install path in build-script. 2019-08-11 23:24:34 -07:00
swift-ci
740cb36b76 Merge remote-tracking branch 'origin/master' into master-rebranch 2019-08-08 18:04:29 -07:00
Brent Royal-Gordon
fb20b503ba Merge branch 'master' into master-rebranch
# Conflicts:
#	lib/ClangImporter/ClangImporter.cpp
#	test/IRGen/builtins.swift
#	test/IRGen/enum.sil
#	tools/driver/autolink_extract_main.cpp
#	utils/build-presets.ini
2019-08-08 17:07:59 -07:00
Ben Langmuir
327c666b8a Revert "[CMake][NFC] Introduce component targets for proper dependency tracking" 2019-08-08 16:35:59 -07:00
Alex Langford
50a0e87c69 [CMake][NFC] Introduce component targets for proper dependency tracking
This commit introduces a CMake target for each component, adds install targets
for them, and switches build-script-impl to use the target `install-components`
for installation. Each of the targets for each component depends on each
of the individual targets and outputs that are associated with the
corresponding swift-component.

This is equivalent to what already exists, because right now install rules are
only generated for components that we want to install. Therefore, this commit
should be an NFC.
2019-08-08 11:50:35 -07:00
Cassie Jones
b059fd5b54 Remove build-script-impl target calculation
It's duplicated between the build-script and the -impl, removing code
from build-script-impl is good.
2019-08-01 14:19:38 -07:00
Stefan Gränitz
dafd027b9c Merge pull request #25184 from adrian-prantl/51317901
build-script: support CMake install steps.
2019-07-11 18:13:18 +02:00
Stefan Graenitz
2fa436e53e [build-script] Run default install target before package testing 2019-07-10 17:12:15 +02:00
Stefan Graenitz
7d58b05cba [CMake] Use CMake caches for lldb in build-script 2019-07-02 13:42:35 +02:00
Adrian Prantl
85ccfe103d build-script: Throttle the number of parallel tests run acording to -j.
This patch propagates the number of parallel jobs from build-script to
llvm-lit. Due to the way how build-script-impl is implemented, changing this
number needs a reconfigure for the Swift tests and can be done on the fly for
LLDB tests, since build-script-impl directly invokes llvm-lit in the latter
case.

rdar://problem/52062631
2019-06-26 15:18:05 -07:00
Jordan Rose
b951eedbd3 [build-script] Fix e11e127db4 to handle Xcode-based builds (#25769)
Xcode puts the bin/ and lib/ directories in a subdirectory based on
configuration; account for this when copying over compiler-rt for
non-host Apple platforms using one of the existing helpers in
build-script-impl.
2019-06-25 19:14:07 -07:00
Alex Lorenz
1cf12f93d9 Do not copy the compiler-rt builtins if the destination directory doesn't exist
rdar://51963563
2019-06-20 15:58:03 -07:00