Commit Graph

6605 Commits

Author SHA1 Message Date
swift-ci
d1abca98df Merge remote-tracking branch 'origin/main' into rebranch 2023-09-07 08:14:37 -07:00
Saleem Abdulrasool
b6764c3f01 Merge pull request #68258 from compnerd/how-do-you-do
build: adjust the build to support non-Apple environments
2023-09-07 08:11:37 -07:00
Saleem Abdulrasool
c8e36f66f5 build: fix the build of the toolchain
This wires up the new macro properly into the build machinery to ensure
that the `distribution` target properly builds and installs the
dependencies.  This fixes the missing `swift-plugin-server` on Windows.
2023-09-06 19:40:45 -07:00
swift-ci
2b13c6e4b3 Merge remote-tracking branch 'origin/main' into rebranch 2023-09-06 14:34:53 -07:00
Steven Wu
afc2bab7f9 Merge pull request #67942 from cachemeifyoucan/eng/PR-swift-scan-plugin-cas-support
[SwiftScan][Caching] Add support for plugin CAS for caching
2023-09-06 14:18:42 -07:00
swift-ci
0407c3d3b2 Merge remote-tracking branch 'origin/main' into rebranch 2023-09-06 13:34:53 -07:00
Saleem Abdulrasool
00d4879c84 build: adjust the build to support non-Apple environments
Account for import libraries and the associated layout difference on
platforms (e.g. DLLs are placed in `bin`).  This is required to enable
building the macro path on Windows.
2023-09-06 12:45:58 -07:00
Allan Shortlidge
0dd8f4c492 AST: Introduce abstraction for extension/type decl inheritance clauses.
Wrap the `InheritedEntry` array available on both `ExtensionDecl` and
`TypeDecl` in a new `InheritedTypes` class. This class will provide shared
conveniences for working with inherited type clauses. NFC.
2023-09-06 10:41:57 -07:00
Steven Wu
0f53e7db46 [SwiftScan][Caching] Add support for plugin CAS for caching
Teach libSwiftScan about plugin CAS and add API to create plugin CAS to
use for dependency scanning and cas operations.
2023-09-06 10:36:23 -07:00
swift-ci
f560dc5cd2 Merge remote-tracking branch 'origin/main' into rebranch 2023-09-05 13:34:36 -07:00
Rintaro Ishizaki
8a2aeb9590 Merge pull request #68273 from rintaro/sourcekit-host-rpath
[SourceKit] RPATH 'lib/swift/host' should be added without BOOTSTRAPPING
2023-09-05 13:14:41 -07:00
swift-ci
56aa4e6933 Merge remote-tracking branch 'origin/main' into rebranch 2023-09-04 08:14:39 -07:00
Saleem Abdulrasool
d5ab98dd82 Merge pull request #68268 from compnerd/reinventing-the-wheel-poorly
swift-plugin-server: adjust API for portability
2023-09-04 08:00:29 -07:00
Saleem Abdulrasool
7f998672d7 Update swift-plugin-server.swift 2023-09-03 19:20:56 -07:00
Saleem Abdulrasool
51107c9698 Update PluginServer.h 2023-09-03 18:56:34 -07:00
swift-ci
e279a465ca Merge remote-tracking branch 'origin/main' into rebranch 2023-09-03 15:53:40 -07:00
Saleem Abdulrasool
981a6d60c4 Merge pull request #68292 from compnerd/extra-mna
SourceKit: handle Windows paths for request options
2023-09-03 15:44:24 -07:00
swift-ci
153d76aa4f Merge remote-tracking branch 'origin/main' into rebranch 2023-09-03 10:54:19 -07:00
Saleem Abdulrasool
a7f3e73587 Update PluginServer.h
Include `stdint.h` for non-MSVC compilers.
2023-09-03 10:39:14 -07:00
Saleem Abdulrasool
6b50edc6f7 SourceKit: handle Windows paths for request options
Windows paths involve a `:`.  Ideally, we would just use `;` as the
separator rather than `:`, but for now just limit the split count to 2.
2023-09-03 10:32:08 -07:00
Saleem Abdulrasool
d97178d8b3 swift-plugin-server: default to C++17
This is required to build on Windows and for C++ interop.
2023-09-02 11:51:15 -07:00
Saleem Abdulrasool
c6222bf8eb swift-plugin-server: adjust API for portability
This begins reworking the API to be less POSIX centric and more
generally usable.  The API was defined in terms of `dlopen`/`dlsym`
rather than the better suited `llvm::sys::DynamicLibrary` APIs which
would avoid most of the work that needs to be done here for platform
specifics.
2023-09-02 11:50:23 -07:00
Rintaro Ishizaki
537f3180c5 [SourceKit] RPATH 'lib/swift/host' should be added without BOOTSTRAPPING
as long as the Swift parser integration is enabled.
Also, remove redundant RPATH additions.
2023-09-01 11:21:09 -07:00
swift-ci
97970caeac Merge remote-tracking branch 'origin/main' into rebranch 2023-08-30 20:55:33 -07:00
Rintaro Ishizaki
9d78971b9b [CMake][SourceKit] Add RPATH to 'lib/swift/host'
RPATH to 'lib/swift/host' was missing in Darwin platform.
2023-08-30 11:56:00 -07:00
swift-ci
484684f0dd Merge remote-tracking branch 'origin/main' into rebranch 2023-08-29 17:55:14 -07:00
Ben Barham
0988236065 Merge pull request #68082 from rintaro/swift-swift-linux
[CMake] Support Macros in Linux
2023-08-29 17:45:26 -07:00
Rintaro Ishizaki
dc6877334f [CMake] Stop some exectuable link with swiftCore
swift-compatibility-symbols, swift-def-to-strings-converter,
and swift-serialize-diagnostics don't use any Swift modules. But when
SWIFT_SWIFT_PARSER was enabled, they are linked with swiftCore. But
these binaries can be executed before the runtime is being built.
We need to stop them linking with swiftCore.
2023-08-28 19:10:01 +00:00
Rintaro Ishizaki
4ccc866612 [CMake] Fix RUNPATH of lib_InternalSwiftScan in Linux
libSwiftScan is built in 'lib' but installed in 'lib/swift/host' RUNPATH
should have correct '$ORIGIN/../{platform}' to load 'swiftCore' runtime
library.
2023-08-28 18:45:53 +00:00
swift-ci
fecdc7961c Merge remote-tracking branch 'origin/main' into rebranch 2023-08-28 10:37:07 -07:00
Rintaro Ishizaki
757aaa347d [CMake] Set LD_LIBRARY_PATH to builder's runtime when building stdlib
In Linux. Instead of setting temporary "fallback" RUNPATH, Set
LD_LIBRARY_PATH to builder's runtime when building standard library.
So we don't need to strip the temporary RUNPATH when installing.
2023-08-28 01:16:18 +00:00
Rintaro Ishizaki
602604be74 [CMake] Further cleanup for RUNPATH setting
`$ORIGIN` is only supported in Linux, BSD, etc. (i.e. not in Windows)
2023-08-25 23:42:19 +00:00
Artem Chikin
e0275f4f0e [Explicit Module Builds] Do not attempt to re-load module dependency from
interface for index.

An explicit module build compile is unable to do so because it does not have
access to the interfaces. Doing this in the first place is a workaround for a
known bug, which will require to be solved at the root cause instead (e.g.
Deserialization Safety feature).

Resolves rdar://113165898
2023-08-25 16:34:09 -07:00
Rintaro Ishizaki
914a6fdf7a [CMake] Fix weiredness in swift runtime linking for SourceKit libraries
SourceKit components are never built while bootstrapping stages. So it
doen't need to have stage 0 or 1 handling.
2023-08-25 22:37:34 +00:00
Rintaro Ishizaki
9017ef51ce [CMake] Update for review comments 2023-08-25 21:58:38 +00:00
Rintaro Ishizaki
0f0c4925ae [CMake] Fatal error when bootstrapping is not "hosttools"
and Swift parser integration is enabled.
If swift parser integration is enabled, SwiftSyntax libraries are always
built with host tools. Other SwiftCompilerSources modules must use the
same runtime with parser libraries.
2023-08-24 23:31:47 +00:00
Rintaro Ishizaki
2a2787b2d0 Avoid adding redundant temporary RUNPATH to builder's stdlib
Many shared libs and executables are only run after stdlib/runtime are
built. They don't need to link with builders stdlib at all.
2023-08-24 23:10:20 +00:00
Rintaro Ishizaki
9c9010e5b7 [CMake] Support Macros in Linux
For compiling codes required for macro support, we now need swiftc
compiler in the build machine.

Unlike Darwin OSes, where swiftCore runtime is guaranteed to be present
in /usr/lib, Linux doesn't have ABI stability and the stdlib of the
build machine is not at the specific location. So the built compiler
cannot relies on the shared object in the toolchain.
2023-08-24 17:04:15 +00:00
swift-ci
0a607cead8 Merge remote-tracking branch 'origin/main' into rebranch 2023-08-14 13:16:19 -07:00
Evan Wilde
d8acc6e2f1 Link or copy in install_symlink
LLVM install_symlink takes a new argument on whether to create a symlink
or copy binaries when run. -- https://reviews.llvm.org/D145443

The variable that controls this in LLVM is `LLVM_USE_SYMLINKS`, which
defaults to `ON` on Unix-y hosts, but otherwise is false so that Windows
works. This is a configurable option, so Windows configs that can
support symlinks can take advantage of symlinks and save some space.
`LLVM_USE_SYMLINKS` is not exported from LLVM though, so we can't see
it to use. Instead, we have `SWIFT_USE_SYMLINKS`.
2023-08-11 10:47:53 -07:00
Hiroshi Yamauchi
24dfc905f5 [lldb] Capture error messages from parseASTSection to log from the caller.
This helps fix a lldb console output mixup between the lldb logging
and the llvm::dbgs() messages from parseASTSection.
2023-08-10 17:08:25 -07:00
Evan Wilde
11fcbbeea2 Cleaning up more deprecation warnings
Pointer `llvm/Support/Host.h` at `llvm/TargetParser/Host.h`.
Replacing deprecated API `startswith_insensitive` with replacement
`starts_with_insensitive`.
2023-08-10 16:19:24 -07:00
swift-ci
49940d20ed Merge remote-tracking branch 'origin/main' into rebranch 2023-08-08 20:55:05 -07:00
Alex Hoppen
bba2f476ab Merge pull request #67613 from barinsim/my-main
[SourceKit] Report cursor info information for literals
2023-08-08 20:54:00 -07:00
swift-ci
8b8db40c5b Merge remote-tracking branch 'origin/main' into rebranch 2023-08-08 07:56:00 -07:00
Mike Ash
7b32ffe601 [swift-inspect] Limit number of jobs printed on an actor.
If we encounter bad data in the target, we could end up trying to print an infinite list of jobs. Clamp it to 1,000 so we fail more gracefully.

rdar://113417637
2023-08-07 16:43:15 -04:00
Evan Wilde
8cc1dea5b9 [SourceKit] Add missing variant header include 2023-08-07 11:37:24 -07:00
Simon Barinka
87878c5f35 [SourceKit] Address minor PR comments 2023-08-03 09:41:25 +02:00
Simon Barinka
76e01b8481 [SourceKit] Address minor PR comments 2023-08-03 09:36:29 +02:00
Simon Barinka
e5fa3f9d2d [SourceKit] Fix formatting issues 2023-08-03 00:53:46 +02:00