Commit Graph

1062 Commits

Author SHA1 Message Date
buttaface
e6f5913772 [android] Move to the NDK's unified sysroot (#34491)
Since the NDK removes the platforms/ and sysroot/ directories in the latest NDK
22, switch to the unified sysroot in toolchains/llvm/ and take advantage of a
bunch of simplification that's now possible.
2021-02-07 09:19:18 -08:00
Dario Rexin
bcd6416c89 Revert "[Concurrency] Build C only libdispatch before Swift on non-Darwin pla… (#35738)" (#35789)
This reverts commit 74e59ab77f.
2021-02-05 13:51:39 -08:00
Dario Rexin
74e59ab77f [Concurrency] Build C only libdispatch before Swift on non-Darwin pla… (#35738)
* [Concurrency] Build C only libdispatch before Swift on non-Darwin platforms

_Concurrency depends on libdispatch and since it is not available by
default on non-Darwin platforms, it needs to be built before the Swift
project, so that the dependency can be resolved.

* Fix clibdispatch installation and BuildSystem tests

* Fix build system tests on Darwin and formatting
2021-02-04 17:15:30 -08:00
Varun Gandhi
36b589d623 Merge pull request #35538 from mininny/disable-dead-stripping-option
[build-script] Add swift-disable-dead-stripping option for disabling dead stripping
2021-01-31 16:31:48 -08:00
Mishal Shah
9a336f2528 Disable CMark tests by default 2021-01-30 11:43:00 -08:00
Eric Miotto
f9be289b9e [build] Amend target options for common C flags (#35559)
Follow up of #35406

Addresses rdar://73502059
2021-01-27 07:06:21 -08:00
Minhyuk Kim
b0426829fe Add swift_disable_dead_stripping option for disabling dead stripping in Swift build 2021-01-22 23:56:02 +09:00
Ikko Ashimine
802788fc1b Fix typo in build-script-impl
targetting -> targeting
2021-01-20 23:09:34 +09:00
Robert Widmann
b436825948 Trade Usages of -m${platform}-version-min For -target
There's no reason to use -m${platform}-version-min as of clang-11/Xcode 11. Clang is now smart enough to parse -target and provide Apple's ld with the appropriate -platform_version argument string.
2021-01-13 11:00:39 -08:00
Varun Gandhi
c6490b23a8 Merge pull request #34963 from buttaface/droid
[android] Support building the host tools and with the static stdlib
2021-01-11 07:42:41 -08:00
Butta
c74884ce30 [build] Make it possible to actually build the stdlib with a prebuilt clang 2020-12-13 18:22:33 +05:30
Butta
47d94da235 [android] Support building the host tools and with the static stdlib 2020-12-05 15:36:57 +05:30
Eric Miotto
8fc2598167 [build-script] Allow to tune dsymutil parallelism (#34795)
This should enable scaling when using machines with large amount of
RAM.

To better support machines with lower spec, process one binary per
dsymutil invocation (reverting #34149).

Add some (limited) facilities to gather the time taken to execute
dsymutil to better assist in tuning the parameter -- these are printed in
JSON format in the log to allow for easier scraping

```
{ "command": "dsymutil", "start": "2020-11-18T18:10:47" }
{ "command": "dsymutil", "end": "2020-11-18T18:14:45" }
```

Addresses rdar://71018443
2020-12-01 07:11:10 -08:00
Saleem Abdulrasool
f18dbf289e build: handle spaces in Xcode better (NFC)
Quote the path to the python interpreter.  Without this change, using a
path with a space in it will prevent CMake from configuring as the
python interpreter's path will be split.
2020-11-25 08:49:36 -08:00
Eric Miotto
e55d6a80e8 Use dedicated module cache to build xctest, llbuild and Foundation (#34728)
This is a small step to ensure multiple build jobs running on the same
machine (e.g. in CI) do not stomp on each other.

This PR does not cover the version detection of the Swift compiler
during the CMake configuration -- in there the compiler gets called once
without any of the `CMAKE_Swift_FLAGS`.

Addresses rdar://71373494
2020-11-13 14:47:00 -08:00
Butta
b7d26337e3 [android] Add support for x86_64 arch 2020-11-11 11:19:14 +05:30
Eric Miotto
f4b86c94a0 Build libdispatch with its own module cache (#34638)
Some of the bots in CI run multiple jobs, so we need to be sure
libdispatch compilations do not attempt to share the module cache.

Addresses rdar://68100533
2020-11-10 07:06:34 -08:00
Mishal Shah
73dc49fc3e [Build System] Remove tvOS i368 slice before copying the libs 2020-10-19 23:05:02 -07:00
Mishal Shah
cc542c0f10 [Build System] Remove tvOS i386 slice from compiler-rt lib
To fix this issue:
ld: building for tvOS, but linking in object file built for tvOS Simulator, file '/tmp/strip.rgKCdx' for architecture i386
fatal error: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: internal link edit command failed

rdar://70443440
2020-10-19 18:59:09 -07:00
3405691582
f4b71b5077 [build] OpenBSD can install XCTest. 2020-10-16 19:25:32 -04:00
Dave Lee
804459df81 Merge pull request #34212 from apple/build-Remove-unused-lldb-cmake
[build] Remove unused lldb cmake
2020-10-14 11:03:17 -07:00
Dave Lee
b02dc2b25b LLDB_PATH_TO_SWIFT_SOURCE too 2020-10-13 21:13:13 -07:00
Eric Miotto
0f6611cfad [build] properly install compiler-rt from Xcode toolchain (#31247)
Similarly to what was done for #25547, copy the compiler-rt built-ins
for embedded platforms from the Xcode toolchain into the new generated
one, so to avoid link time errors.

Addresses SR-12001, rdar://57837918
2020-10-12 07:12:04 -07:00
Dave Lee
27330f169d [build] Remove unused lldb cmake 2020-10-06 18:17:32 -07:00
Saleem Abdulrasool
563c99bc7c Merge pull request #34160 from buttaface/arm
[android] Add support for building the toolchain for ARMv7
2020-10-04 14:40:44 -07:00
Dave Lee
573886d5d6 [build] Remove forced tracing of lldb dotest 2020-10-03 11:59:59 -07:00
Butta
f7576a7bef [android] Add support for building the toolchain for ARMv7 2020-10-03 18:55:23 +05:30
Eric Miotto
7271fd079e [build] Run dsymutil on multiple files at a time (#34149)
The change in #33654 had the effect of not leveraging dsymutil
parallelism -- pass instead multiple file at once.

Addresses rdar://69550787
2020-10-02 10:06:44 -07:00
Alex Lorenz
a4c39632f4 [build-script] copy over the compiler-rt .a archives from the toolchian only when necessary 2020-09-23 12:12:21 -07:00
Kuba (Brecka) Mracek
41f91d5365 Add a SWIFT_FREESTANDING_MODULE_NAME CMake option (#34018) 2020-09-22 15:14:44 -07:00
Kuba (Brecka) Mracek
58f2ae695b Add a SWIFT_STDLIB_STABLE_ABI flag to be able to build the stdlib without -enable-library-evolution (#33443) 2020-09-21 16:33:00 -07:00
Michael Gottesman
48558f322b Merge pull request #33950 from gottesmm/pr-4bccd8250f399d6de00468d798d40b170fe4edf2
[build-script-impl] Add a comment explaining why an option isn't truly dead as per reviewers suggestion.
2020-09-15 21:26:54 -07:00
swift-ci
9d4062ab12 Merge pull request #33939 from apple/dl/build-script-Disable-pkg-config-for-Darwin-hosts 2020-09-15 18:56:57 -07:00
Michael Gottesman
5717d8713a [build-script-impl] Add a comment explaining why an option isn't truly dead as per reviewers suggestion.
In the original revert, this option was used in two places and I added a comment
only on the first one. This copies the comment onto the second usage of the
option.

Thanks to @edymtt and @compnerd for catching my careless error!
2020-09-14 16:43:23 -07:00
Michael Gottesman
9010c1b6f3 Merge pull request #33760 from gottesmm/pr-1d2143f460a9d74a60af3be92d03f404a9cde805
Revert "build-script: remove dead CMake options for Swift"
2020-09-14 16:39:56 -07:00
Dave Lee
157505196a [build-script] Disable pkg-config for Darwin hosts 2020-09-14 08:14:26 -07:00
Kuba (Brecka) Mracek
d9d929a594 Revert "Start using optimization (-O0/-O2/-O3/-Os) and debug (-g) flags from CMAKE_CXX_FLAGS_${CFLAGS_BUILD_TYPE} (#33388)" (#33924) 2020-09-11 21:06:05 -07:00
Kuba (Brecka) Mracek
aa0f8e670b Add a SWIFT_STDLIB_OS_VERSIONING flag to avoid querying OS version at runtime, use it in the freestanding build (#33791) 2020-09-11 08:09:14 -07:00
Saleem Abdulrasool
b9d1b989e9 Merge pull request #33489 from compnerd/additional-paths
build: add additional search paths for Foundation artifacts
2020-09-05 07:41:41 -07:00
Saleem Abdulrasool
2b67a9de7d Merge pull request #33774 from compnerd/timeout
utils: add a timeout to the integration tests
2020-09-04 13:41:53 -07:00
Saleem Abdulrasool
9f01742d94 Update build-script-impl
Fix quoting
2020-09-03 09:38:46 -07:00
Saleem Abdulrasool
8125f772a0 Update build-script-impl
Reduce timeout to 20m
2020-09-02 15:47:07 -07:00
Saleem Abdulrasool
66059a4935 utils: add a timeout to the integration tests
This will allow us to add test cases which may hang.  The timeout here
is taken from the value we use in the regular test suite (along with the
check for the timeout requirements).
2020-09-02 22:40:23 +00:00
Kuba (Brecka) Mracek
bfc9b5447f Add llvm-nm to list of LLVM tools built with stdlib standalone mode (#33681) 2020-09-02 13:49:01 -07:00
Michael Gottesman
c8d4d168f7 Revert "build-script: remove dead CMake options for Swift"
This reverts commit 95102bc258.

This is actually a dead option that is relied upon for some configurations. I am
going to add a note to not touch the option.

I talked with compnerd about this and they are cool with this.

I think that we can redo this in a nicer way when we are further into the
build-script-impl refactoring.

I added a note to the code to explain that it isn't dead.
2020-09-02 10:58:36 -07:00
Mishal Shah
bf7c03b1f6 Support cross compile Xcode toolchain for Apple Silicon
Support cross compile Xcode toolchain for Apple Silicon

* Add CMake flag DCMAKE_OSX_ARCHITECTURES to LLVM

* Add CMake flag DCMAKE_OSX_ARCHITECTURES to cmark

* Add CMake flag DCMAKE_OSX_ARCHITECTURES to lldb

* Add CMake flag DCMAKE_OSX_ARCHITECTURES to llbuild

* Add llbuild CMake options array to provide DCMAKE_OSX_ARCHITECTURES

* [Build System] Use one install package for cross compile hosts

* Remove Lipo before non-build-script-impl products

* Add support to only lipo without running installable package tests

* [Build System] Support cross compile install prefix for SwiftPM product in Swift Build Support

* Use cross compile toolchain path for indexstoredb and swift-driver

* Use cross compile toolchain path for swiftpm, swiftsyntax, swiftformat, and skstresstester

* Add cross compile toolchain support to Benchmarks, and fix the python lint issue in skstresstester.py

* [SwiftPM] Add support for cross-compile-hosts flag to build swiftpm using bootstrap script
2020-09-02 10:14:51 -07:00
Eric Miotto
853586fc07 [build] Reinstate CMAKE_CXX_FLAGS_${CFLAGS_BUILD_TYPE} for LLVM (#33745)
Set those at the value pre #33388 -- this would avoid regressions
of disk space usage (in particular around building Swift LTO)

Addresses rdar://68091272
2020-09-01 15:31:33 -07:00
Michael Gottesman
af4199e4f6 [build-toolchain] Add an option to control if code built by the toolchain links by default to the OS runtime or the toolchain runtime.
Today by default, we always link against the runtime runtime. This option just
lets our users decide what they want, but leaves the defaults alone.
2020-08-31 11:06:46 -07:00
Kuba (Brecka) Mracek
7a6f84dc64 When building standalone stdlib, explicitly use C/C++ compilers from NATIVE_CLANG_TOOLS_PATH (#33675) 2020-08-28 20:50:20 -07:00
Eric Miotto
102d6387d9 [build] Don't execute dsymutil in parallel (#33654)
`dsymutil` is already multithreaded and can be memory intensive --
execute it one at a time.

Addresses rdar://63892559
2020-08-27 10:25:51 -07:00