Commit Graph

1333 Commits

Author SHA1 Message Date
Hamish Knight
cfda4b1764 [build-script] Allow specifying the number of lit workers
Allow tests to run with a different number of
workers than build jobs if desired.
2022-09-14 14:01:49 +01:00
Eric Miotto
ba2a88a33a Rely on macOS deployment target set by compiler-rt for sanitizers
Using newer targets can lead to build failures, see

41c52889b9
b87fc09dce

This has no effect currently, it is meant to support the switch
to `LLVM_ENABLE_RUNTIMES` to build compiler-rt -- #58465

Addresses rdar://99140817
2022-09-07 01:30:52 -07:00
Robert Widmann
f9cff13604 Move All the Gyb Support for Syntax out of Swift
Make libSyntax depend on swift-syntax: the new home for all
of this infrastructure. This greatly simplifies the addition and
amending of syntax nodes as only the swift-syntax paired with a
swift checkout will need to be changed. This is in contrast to
the existing build flow where a paired PR to both repos must be
made to change anything here.

Note that a paired PR may still be required if the legacy parser
needs to be adjusted in response to syntax nodes changing, but I
anticipate this to be a much more infrequent event now that
the C++ end of libSyntax is deprecated.
2022-08-31 13:10:24 -07:00
3405691582
3740a207bd Apply suggestions from code review
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2022-08-29 10:47:42 -04:00
3405691582
47ae4d9a53 Preliminary Linux-OpenBSD cross-compile support.
With a properly prepared sysroot and toolchain file, these changes permit
cross-compilation of Swift as well as LLVM, CMark, and Dispatch (picking,
as usual, apple/swift-corelibs-libdispatch#556) from a Linux host
generating OpenBSD binaries.

The toolchain file must be specified as an environment variable to
`build-script` and discussion on how to properly set up the sysroot and
toolchain file will be handled later.
2022-08-28 22:39:46 -04:00
Ben Barham
22d62bb4e0 Merge remote-tracking branch 'origin/main' into rebranch
Trivial conflict caused by the line above the
`IGM.constructInitialFnAttributes` change in `lib/IRGen/GenDecl.cpp`
having an extra argument passed in rebranch (due to the new LLVM API).
2022-08-03 19:12:06 -07:00
Mishal Shah
196ee143c5 Xcode 14 beta 4 no longer supports iOS armv7, armv7s, and i386 architectures
> Building iOS projects with deployment targets for the armv7, armv7s, and i386 architectures is no longer supported. (92831716)
2022-08-02 20:42:08 -07:00
swift-ci
c67edb8e94 Merge remote-tracking branch 'origin/main' into rebranch 2022-07-28 10:54:39 -07:00
Mishal Shah
caf9bf5d7b Merge pull request #41223 from apple/log-build-time
[Build System] Add support to log build times for each products
2022-07-28 10:39:29 -07:00
swift-ci
6be158fbc4 Merge remote-tracking branch 'origin/main' into rebranch 2022-07-05 23:35:17 -07:00
Alastair Houghton
b5735559eb [Threading] Fix threading package defaults.
These are better done via the SwiftConfigureSDK mechanism rather than
how I was doing them previously.  Additionally, I've changed the way
that the swift-threading-package option works.  In addition to
specifying just a single package name, you can specify it as a CMake
list (i.e.  separate by semicolons) of colon-separated `sdk:package`
pairs, e.g.  `osx:darwin;linux:pthreads`.  You can also override it
for all SDKs and then specify for a given SDK; specifications for a
particular SDK take precedence over the global override.  For instance
`pthreads;osx:darwin` says to use `pthreads` except on the OS X SDK
where we should use `darwin`.
2022-06-30 16:07:00 +01:00
swift-ci
3597ca75f0 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-09 02:52:39 -07:00
Mishal Shah
4c19ba404b Merge branch 'main' into log-build-time 2022-06-08 16:55:34 -07:00
Alastair Houghton
f5bdb858e0 [Threading] Create new threading library and use it.
Moved all the threading code to one place.  Added explicit support for
Darwin, Linux, Pthreads, C11 threads and Win32 threads, including new
implementations of Once for Linux, Pthreads, C11 and Win32.

rdar://90776105
2022-06-07 07:39:51 +01:00
Alastair Houghton
0cf687aa2b [Build][Runtime] Replace SWIFT_STDLIB_SINGLE_THREADED_RUNTIME.
SWIFT_STDLIB_SINGLE_THREADED_RUNTIME is too much of a blunt instrument here.
It covers both the Concurrency runtime and the rest of the runtime, but we'd
like to be able to have e.g. a single-threaded Concurrency runtime while
the rest of the runtime is still thread safe (for instance).

So: rename it to SWIFT_STDLIB_SINGLE_THREADED_CONCURRENCY and make it just
control the Concurrency runtime, then add a SWIFT_STDLIB_THREADING_PACKAGE
setting at the CMake/build-script level, which defines
SWIFT_STDLIB_THREADING_xxx where xxx depends on the chosen threading package.

This is especially useful on systems where there may be a choice of threading
package that you could use.

rdar://90776105
2022-06-07 07:39:51 +01:00
Alex Hoppen
4aa2bbbf06 Revert "Merge pull request #42447 from al45tair/eng/PR-90776105"
This reverts commit 8bcb71140f, reversing
changes made to c4dd271d36.
2022-06-02 18:03:23 +02:00
Alastair Houghton
8bcb71140f Merge pull request #42447 from al45tair/eng/PR-90776105
[Build][Runtime] Add a new threading library.
2022-06-01 12:57:23 -07:00
Ben Barham
92b6dd24c2 Merge branch 'main' into manually-merge-main 2022-05-25 15:55:35 -07:00
Alex Hoppen
e2012dddf3 Merge pull request #41314 from ahoppen/pr/build-lld
[build-script] Add option to build lld as part of LLVM
2022-05-25 07:58:54 +02:00
Alastair Houghton
63a09007a1 [Threading] Create new threading library and use it.
Moved all the threading code to one place.  Added explicit support for
Darwin, Linux, Pthreads, C11 threads and Win32 threads, including new
implementations of Once for Linux, Pthreads, C11 and Win32.

rdar://90776105
2022-05-24 14:57:39 +01:00
Alastair Houghton
dadcb04ae2 [Build][Runtime] Replace SWIFT_STDLIB_SINGLE_THREADED_RUNTIME.
SWIFT_STDLIB_SINGLE_THREADED_RUNTIME is too much of a blunt instrument here.
It covers both the Concurrency runtime and the rest of the runtime, but we'd
like to be able to have e.g. a single-threaded Concurrency runtime while
the rest of the runtime is still thread safe (for instance).

So: rename it to SWIFT_STDLIB_SINGLE_THREADED_CONCURRENCY and make it just
control the Concurrency runtime, then add a SWIFT_STDLIB_THREADING_PACKAGE
setting at the CMake/build-script level, which defines
SWIFT_STDLIB_THREADING_xxx where xxx depends on the chosen threading package.

This is especially useful on systems where there may be a choice of threading
package that you could use.

rdar://90776105
2022-05-24 14:57:38 +01:00
swift-ci
1d774bffdb Merge remote-tracking branch 'origin/main' into rebranch 2022-05-10 11:15:05 -07:00
Karoy Lorentey
1e6bab05f7 [build] Add build options to force-enable debug preconditions and to set a trap function in the stdlib
(The underlying functionality was added in #41445 and #41449, respectively.)
2022-05-06 18:39:39 -07:00
Ben Barham
ba3f582155 [next] Do not use libcxx standalone build
This was removed in llvm/llvm-project
6f17768e11480063f4c2bcbeea559505fee3ea19. Use new build instead.
2022-05-05 16:25:10 -07:00
DhruveshParmar
cd1a98cf4b Use Python 3 2022-04-24 13:08:11 +05:30
Evan Wilde
7dadb09357 Merge pull request #42253 from etcwilde/ewilde/build-foundation-dependencies
Teach build-script to build Foundation Dependencies (Zlib, libxml2, LibCurl)
2022-04-12 19:15:32 -07:00
Alex Hoppen
e313df88ce [build-script] Add option to build lld as part of LLVM 2022-04-12 16:38:34 +02:00
Richard Wei
acca7cb891 Build regex parser by default.
Currently, SwiftCompilerSources' inclusion of the regex parser depends on CMake flag `SWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING`. However, in some scenarios we want to build the regex parser as part of the compiler _without_ building the runtime modules. This patch makes building the regex parser the default regardless of `SWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING`. Only when the build environment is missing the string processing repo, we skip building the regex parser by setting `SWIFT_BUILD_REGEX_PARSER_IN_COMPILER` to false.
2022-04-12 01:01:15 -07:00
Evan Wilde
ef8c14996d Add curl build product
Add libcurl as a build product. This is another piece required to build
foundation in a freestanding configuration.
2022-04-11 20:39:33 -07:00
Evan Wilde
d7184742de Add zlib build product
This patch adds a zlib and static-zlib build product, respectively
producing a dynamic and static zlib library. This is a dependency of
building Foundation.
2022-04-11 20:39:32 -07:00
Evan Wilde
91578162e1 Add libxml2 build product
This patch adds the libxml2 build product as a dependency of building
foundation.
2022-04-11 20:39:32 -07:00
Puyan Lotfi
d4ea32ca99 Merge pull request #42009 from plotfi/main2
[build-script] Drop Python2.7 from swift_cmake_options.
2022-04-04 19:12:31 -04:00
Alastair Houghton
373b9e14de [Build] Properly respect the darwin-crash-reporter-client setting.
This was being turned on even when set to zero, because of the logic
in `build-script-impl`.

rdar://90839754
2022-03-25 23:34:20 +00:00
Alastair Houghton
eb6f9e0bba Merge pull request #41452 from al45tair/eng/PR-89139049
[Demangler] Make Node::addChild(NULL, ...) always assert.
2022-03-25 10:03:59 +00:00
Alastair Houghton
b253705fe8 [Build][Demangler] Enable crash reporter integration on Darwin.
Crash reporter integration was only enabled for iOS.  Enable it for
any Darwin platform, but disable it for the minimal build.

Also fix up a couple of issues that popped up when it was enabled.

rdar://89139049
2022-03-24 22:37:13 +00:00
Puyan Lotfi
66f4a84a86 [build-script] Drop Python2.7 from swift_cmake_options.
Since Swift is dropping Python2 support, and since this xcrun line causes
spurious errors during a build-script build on systems without Python2,
I am proposing we drop this xcrun -find line from build-script-impl.
2022-03-24 15:41:06 -04:00
Alastair Houghton
f204f0634b Add a build option for the concurrency tracing feature.
Concurrency tracing was enabled depending on the presence of a header
file, but if a similarly named header was found somewhere in the path
that didn't do the same thing, that might cause problems.

Instead, we should have a build time configuration option.

rdar://89787540
2022-03-09 12:53:10 +00:00
Robert Widmann
7cd3541c62 Merge pull request #41656 from MillerTechnologyPeru/feature/ppc32
[stdlib] Added PowerPC 32-bit support
2022-03-07 15:08:26 -08:00
Alsey Coleman Miller
b85e673a78 [stdlib] Added Armv5 support 2022-03-06 00:56:32 -05:00
Alsey Coleman Miller
0ab3eec987 Added PowerPC 32-bit support 2022-03-03 22:21:33 -05:00
Dave Lee
281f16f18a [build] Remove vestiges of no-debugserver option 2022-02-16 09:17:24 -08:00
Michael Gottesman
59feb67645 [build-script] Add support for running sil-verify-all only on macOS x86_64.
This will let us save some build time without losing the coverage of
sil-verify-all everywhere since much of the code in all of the stdlibs are the
same.
2022-02-10 12:08:03 -08:00
Kuba (Brecka) Mracek
d2957338f8 Set SWIFT_STDLIB_ENABLE_VECTOR_TYPES=0 for the freestanding stdlib (#41169) 2022-02-06 07:47:57 -08:00
Mishal Shah
54c24dc7c6 [Build System] Add support to log build times for each products 2022-02-04 18:13:30 -08:00
Kuba (Brecka) Mracek
05a17cc622 Enable -disable-preallocated-instantiation-caches for the freestanding stdlib (#41170) 2022-02-04 06:53:32 -08:00
Alejandro Alonso
5aa88660fe Explicitly pass ICU_DATA_LIBRARY when building foundation 2022-01-27 10:29:49 -08:00
Butta
3e7717673d [build] Add a flag that allows disabling appending the host target's name to the install-destdir for a cross-compiled toolchain
This is useful if you're cross-compiling the toolchain for a single host and don't
want your specified install path modified.
2022-01-17 22:57:48 +05:30
Robert Widmann
9429514268 Merge pull request #40659 from buttaface/stdlib-remove-icu
[build] Remove last vestiges of ICU for anything other than Foundation
2022-01-07 00:36:13 -08:00
Kuba (Brecka) Mracek
5076af2ae4 Add a codesize check of the freestanding/minimal stdlib to prevent large codesize regressions (#40653) 2022-01-05 15:12:02 -08:00
Butta
2890d15da7 [build] Remove last vestiges of ICU for anything other than Foundation 2021-12-25 21:16:34 +05:30