Commit Graph

1631 Commits

Author SHA1 Message Date
Anthony Latsis
d553d0466a Merge pull request #62355 from AnthonyLatsis/sr-no-sr
[NFC] Migrate remnant Jira issue references to GitHub issues
2022-12-04 12:08:25 +03:00
Anthony Latsis
4cb63c8a0f [NFC] Migrate remnant Jira issue references to GitHub issues 2022-12-04 08:20:34 +03:00
swift-ci
9638cd3de8 Merge remote-tracking branch 'origin/main' into rebranch 2022-12-02 12:37:21 -08:00
Saleem Abdulrasool
70a148dc2f Merge pull request #62367 from compnerd/clang-cl
build: honour `SWIFT_CLANG_LOCATION`
2022-12-02 12:30:42 -08:00
Saleem Abdulrasool
6c384e0b78 build: honour SWIFT_CLANG_LOCATION
We would previously use `clang-cl` without the explicit path which could
find an alternative `clang-cl` instance.  This manifested as a failure
to build libdispatch as part of the compiler when cross-compiling x64 to
arm64.
2022-12-02 09:14:56 -08:00
swift-ci
21b2cf9c50 Merge remote-tracking branch 'origin/main' into rebranch 2022-12-01 20:14:31 -08:00
Erik Eckstein
d89c6b2d70 Merge remote-tracking branch 'origin/main' into rebranch 2022-12-01 07:48:51 +01:00
Doug Gregor
8f7b303e83 Set host libraries rpath correctly for bootstrapped builds 2022-11-30 18:11:02 -08:00
Doug Gregor
b338472a2b Start building libswift_CompilerPluginSupport into lib/swift/host. 2022-11-30 13:54:03 -08:00
Doug Gregor
20013181e1 [CMake] Link to swift-syntax libriares from lib/swift/host. 2022-11-30 13:54:03 -08:00
Saleem Abdulrasool
d0a7ceab4c Merge pull request #61816 from mhjacobson/freebsd-strip-version-suffix
build: add missing `REGEX` to properly strip {Free,Open}BSD version suffixes
2022-11-30 07:24:51 -08:00
swift-ci
9d3c3443a8 Merge remote-tracking branch 'origin/main' into rebranch 2022-11-28 20:14:05 -08:00
Robert Widmann
269dfb4c3b Adapt to the Removal of SerializationCodes.py
See https://github.com/apple/swift-syntax/pull/1089
2022-11-28 16:16:51 -07:00
swift-ci
771dab152e Merge remote-tracking branch 'origin/main' into rebranch 2022-11-28 08:34:02 -08:00
Max Desiatov
5cc0808ef9 SwiftConfigureSDK.cmake: convert tabs to spaces (#62237)
Using tabs instead of spaces led to inconsistency and broken formatting.
2022-11-28 16:30:13 +00:00
swift-ci
601e353c81 Merge remote-tracking branch 'origin/main' into rebranch 2022-11-16 00:34:21 -08:00
Doug Gregor
52b64e53ae [SourceKit] Make sure we link the compiler plugin support library 2022-11-15 20:52:40 -08:00
Doug Gregor
c0d53c4a47 [CMake] Fixup build for compiler plugin support library 2022-11-15 19:32:20 -08:00
swift-ci
662f51f7db Merge remote-tracking branch 'origin/main' into rebranch 2022-11-10 06:54:04 -08:00
eeckstein
cd47e7ff98 Merge pull request #61921 from mhjacobson/freebsd-fix-bootstrapped-build
build: support bootstrapped build on FreeBSD
2022-11-10 15:45:07 +01:00
Matt Jacobson
457af8502e build: add missing REGEX to properly strip FreeBSD version suffix
Remove identical logic for OpenBSD, which doesn't include suffixes in
`$CMAKE_SYSTEM_VERSION`.
2022-11-08 03:15:01 -05:00
Eric Miotto
21c0c465c6 [rebranch] Adapt to new signature for llvm_install_symlink...
and match the usage pattern employed by other LLVM projects.

For context about the underlying change see  https://reviews.llvm.org/D117977

Addresses rdar://101396797

(cherry picked from #61769, commit 2763cc3911)
2022-11-04 20:44:18 +01:00
Robert Widmann
7944635f2e Merge pull request #61898 from CodaFi/i-write-syns-not-tragedies 2022-11-04 08:20:47 -07:00
Matt Jacobson
61cf0970a1 build: support bootstrapped build on FreeBSD
Fixes failures to link and run the bootstrapping1 compiler.
2022-11-03 17:34:26 -04:00
Robert Widmann
2d07f382c5 Delete _InternalSwiftSyntaxParser And Its Build Infrastructure
This is the start of the removal of the C++ implementation of libSyntax
in favor of the new Swift Parser and Swift Syntax libraries. Now that
the Swift Parser has switched the SwiftSyntaxParser library over to
being a thin wrapper around the Swift Parser, there is no longer any
reason we need to retain any libSyntax infrastructure in the swift
compiler.

As a first step, delete the infrastructure that builds
lib_InternalSwiftSyntaxParser and convert any scripts that mention
it to instead mention the static mirror libraries. The --swiftsyntax
build-script flag has been retained and will now just execute the
SwiftSyntax and Swift Parser builds with the just-built tools.
2022-11-02 10:35:29 -07:00
Alsey Coleman Miller
62b7be4e9c [stdlib] Add RISCV64 support 2022-11-01 23:59:42 -07:00
Alex Hoppen
d6bcfd915a [CMake] Fix issues when running build-tooling-libs
There were three different issues going on here, all of these were triggered by https://github.com/apple/swift/pull/61618 which stared including `AST/AnyFunctionRef.h` from the ASTBridging modulemap

- We did not find the clang include dirs because the unified build that build-tooling-libs is using does not import ClangConfig, setting `CLANG_INCLUDE_DIRS` in `swift_common_unified_build_config` fixed this problem.
- Some of the headers in `swift-ast-generated-headers` import generated headers from clang that might not have been created yet. Making `swift-ast-generated-headers` depend on the clang generated headers fixes this problem. This just lowers the dependency because `swiftAST` depends on `swift-ast-generated-headers`
- If a Swift compiler from Xcode is used, the SwiftShims don’t live next to the compiler but in the SDK. Adding the SDKs lib to the include paths fixes this problem
2022-10-22 12:35:17 +02:00
Matt Jacobson
1a0ea75b5c build: fix syntax error in FreeBSD section of configure_sdk_unix 2022-10-20 23:52:13 -04:00
Doug Gregor
962e330e9a [CMake with Swift] Add toolchain lib path for stage != 0 bootstrapping builds.
Fixes a linker failure where we cannot find the compatibility libraries.
2022-09-27 14:40:21 -07:00
Doug Gregor
c50d16634d [CMake with Swift] Set rpath for stage != 0 bootstrapping builds. 2022-09-23 09:19:54 -07:00
Doug Gregor
fe05b47c69 Add missing file dependency for gyb'd attribute generation. 2022-09-23 05:59:48 -07:00
Alex Hoppen
b1040649f2 Merge pull request #61226 from ahoppen/ahoppen/move-gyb-syntax-support
Move gyb_syntax_support in swift-syntax from Sources/generate-swift-syntax-builder to Code-Generation
2022-09-23 14:17:44 +02:00
Alex Hoppen
3bb4d4d65d Move gyb_syntax_support in swift-syntax from Sources/generate-swift-syntax-builder to Code-Generation 2022-09-23 11:04:27 +02:00
Doug Gregor
328fcdf754 [CMake] Bootstrap stagae 0 also needs the host Swift libraries 2022-09-22 19:09:11 -07:00
Doug Gregor
c50b142a14 [Build] Ensure that we link in SwiftSyntax and Swift for all executables 2022-09-22 12:03:19 -07:00
Doug Gregor
27b83b0f02 [Unit tests] Use the rpaths determined for unit tests
The function that adds runtime link flags overrides RPATH settings via
`BUILD_WITH_INSTALL_RPATH`. Stop doing that for unit tests, because they
depend on host libraries built into `lib` not `lib/swift/${platformname}`.
2022-09-16 22:23:29 -07:00
Egor Zhdan
84a1ffcb33 [Shims] Include SwiftShims headers without ../
This replaces a number of `#include`-s like this:
```
#include "../../../stdlib/public/SwiftShims/Visibility.h"
```
with this:
```
#include "swift/shims/Visibility.h"
```

This is needed to allow SwiftCompilerSources to use C++ headers which include SwiftShims headers. Currently trying to do that results in errors:
```
swift/swift/include/swift/Demangling/../../../stdlib/public/SwiftShims/module.modulemap:1:8: error: redefinition of module 'SwiftShims'
module SwiftShims {
       ^
Builds.noindex/swift/swift/bootstrapping0/lib/swift/shims/module.modulemap:1:8: note: previously defined here
module SwiftShims {
       ^
```
This happens because the headers in both the source dir and the build dir refer to SwiftShims headers by relative path, and both the source root and the build root contain SwiftShims headers (which are equivalent, but since they are located in different dirs, Clang treats them as different modules).
2022-09-14 11:14:50 +01:00
Doug Gregor
b247c6d9f3 Enable build of Swift Swift parser even when bootstrapping is OFF.
The Swift Swift parser doesn't require any bootstrapping, so allow it to
be built even when bootstrapping is off.
2022-09-07 17:52:21 -07:00
Evan Wilde
0d1c33674c Merge pull request #60711 from etcwilde/ewilde/reapply-backdeploy56
Revert reverting the 5.6 backdeploy
2022-09-06 14:58:17 -07:00
Egor Zhdan
ba31ca4ea6 [build] Remove unused GLIBC_INCLUDE_PATH macro
This macro was previously substituted when generating `glibc.modulemap` file during the compiler build. Now Swift detects the location of Glibc dynamically and injects `glibc.modulemap` into it using LLVM VFS. The last usage of `GLIBC_INCLUDE_PATH` was removed in `78c0540b`.

This also removes `SWIFT_SDK_${sdk}_ARCH_${arch}_LIBC_INCLUDE_DIRECTORY` which doesn't have any usages left.
2022-09-05 18:57:29 +01:00
Doug Gregor
9e387148d1 Ensure to link unit tests against the Swift libraries when using the new parser 2022-09-01 11:57:35 -07:00
Evan Wilde
312d392d16 Include host compatibility library build directory
The SDK doesn't have the new compatibility library and the
crosscompile-with-hostlibs bootstrap configuration is failing.

This bootstrap configuration is the only one that does not fall back on
the host built compatibility libraries if it is not available in the
SDK.
2022-09-01 10:07:47 -07:00
Doug Gregor
5ea5f3b45d Optional support for round-trip testing the new Swift parser.
When enabled, compile in support for round-trip testing the new
SwiftSyntax-provided Swift parser alongside the existing parser. Right
now, this means parsing every source file with the new parser and
ensuring that the resulting syntax tree can reproduce the input source
precisely. Over time, this is expected to grow.

Opt in to this behavior by passing the following to build-script:

    build-script --early-swiftsyntax --extra-cmake-options=-DSWIFT_SWIFT_PARSER_MODE:STRING=ROUNDTRIP
2022-09-01 08:56:22 -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
Saleem Abdulrasool
1eb294d95b Merge pull request #60823 from 3405691582/cross
Preliminary Linux-OpenBSD cross-compile support.
2022-08-31 08:28:02 -07:00
Eric Miotto
b6878ce752 Link all compatibility libraries when cross compiling and bootstrapping (#60728)
Refactor the logic so to have a single target to reference the
compatibility libraries for the host, and use that when needed.

The main driver for this change is supporting the cross-compilation of
x86-64 on Apple Silicon.

Supports rdar://90307965
2022-08-31 02:18:19 -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
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
Alastair Houghton
1b34fa9c5c [Threading] Minor improvements to SWIFT_THREADING_PACKAGE support
Added a check that someone hasn't passed us an argument with too many
colons.  Also renamed `find_threading_package` to `get_threading_package`
to better reflect what it does.
2022-07-01 15:06:25 +01:00