Commit Graph

9 Commits

Author SHA1 Message Date
Rintaro Ishizaki
9a881cb91a [CMake] Set CMAKE_{C|CXX}_COMPILER_TARGET for swift-syntax
swift-syntax now have '.c' sources. We need to set this for
cross-compiling.
2025-01-09 10:20:10 -08:00
Rintaro Ishizaki
a0d7068162 Revert "Merge pull request #78280 from swiftlang/revert-77140-swift-lexical-lookup-validation"
This reverts commit ae88aaca8f, reversing
changes made to b0123bca14.
2024-12-20 16:37:36 -08:00
Ben Barham
e06d0b9357 Revert "[SwiftLexicalLookup] New unqualified lookup implementation validation" 2024-12-18 15:04:16 -08:00
Jakub Florek
ba004b6be0 Fix validation of names with end flag. Fix missing lib in cmake file. 2024-11-01 20:45:55 +01:00
Daniel Rodríguez Troitiño
d3b788fedb [cmake] Add missing dependency between component and its targets (#76596)
`swift_install_in_component` does not create a dependency between its
`TARGETS` and the `COMPONENT`, so one has to be created manually.
The missing dependency might cause invocations to CMake/Ninja for the
`install-*` targets to not build the required files before the
installation is performed. Because the normal `build-script` builds the
`all` target, this kind of missing dependencies like this are common.

This bit of code appeared in #76497 some days ago.
2024-09-20 01:41:21 -07:00
Rintaro Ishizaki
e916e9e459 [CMake] Give a dedicated component to compiler swift-syntax libraries (#76497)
* [CMake] Give a dedicated component to compiler swift-syntax libraries

'compiler-swift-syntax-lib' so projects statically link to compiler
libraries (libAST etc) can use the required shared libraries.

rdar://135923606

* Update cmake caches

* Add back implicit `swift-syntax-lib` to `compiler` component for now

Some clients doesn't specify `swift-syntax-lib`.
2024-09-16 21:34:32 -07:00
Rintaro Ishizaki
4a39290491 [CMake] Exclude swift-syntax targets from 'all'
We only want swift-syntax libraries as dependencies
2024-09-09 17:13:59 -07:00
Doug Gregor
ddbbb5a71e Address code review comments and build failure 2024-08-02 10:04:28 -07:00
Rintaro Ishizaki
2f7aa428db [Macros] In-process plugin server
Separate swift-syntax libs for the compiler and for the library plugins.
Compiler communicates with library plugins using serialized messages
just like executable plugins.

* `lib/swift/host/compiler/lib_Compiler*.dylib`(`lib/CompilerSwiftSyntax`):
  swift-syntax libraries for compiler. Library evolution is disabled.
* Compiler (`ASTGen` and `swiftIDEUtilsBridging`) only depends on
  `lib/swift/host/compiler` libraries.
* `SwiftInProcPluginServer`: In-process plugin server shared library.
  This has one `swift_inproc_plugins_handle_message` entry point that
  receives a message and return the response.
* In the compiler
  * Add `-in-process-plugin-server-path` front-end option, which specifies
    the `SwiftInProcPluginServer` shared library path.
  * Remove `LoadedLibraryPlugin`, because all library plugins are managed
    by `SwiftInProcPluginServer`
  * Introduce abstract `CompilerPlugin` class that has 2 subclasses:
    * `LoadedExecutablePlugin` existing class that represents an
      executable plugin
    * `InProcessPlugins` wraps `dlopen`ed `SwiftInProcPluginServer`
  * Unified the code path in `TypeCheckMacros.cpp` and `ASTGen`, the
    difference between executable plugins and library plugins are now
    abstracted by `CompilerPlugin`
2024-06-17 11:36:52 -07:00