Commit Graph

6 Commits

Author SHA1 Message Date
Doug Gregor
0e9c3eff8a [Macros] Add OptionSet and plumb it through 2023-03-03 21:39:16 -08:00
Doug Gregor
e9ebcba6af Fix install path for macro plugin libraries 2023-03-03 17:26:35 -08:00
Doug Gregor
8a16c8b18c [CMake] Don't try to modify a macro target when it wasn't built 2023-03-03 15:01:00 -08:00
Doug Gregor
5786cbd602 [Macros] Make the compiler frontend depend on the macro plugin libraries
The dependency of the Observation library on the observation macro
plugin introduces a direct dependency of a target library on a host
library, (lib -> stdlib) that we'd like to avoid. Instead, make the
Swift frontend binary depend on the macro plugin libraries that we
build, so that it's the complete host-side stack.
2023-03-03 14:58:42 -08:00
Doug Gregor
6b0a0b6555 [CMake] Rework build of ASTGen and ObservationMacros
Refactor the build support for ASTGen and ObservationMacros. Both have
nearly-identical copies of a bunch of messy, workaround-laden CMake
code to build "pure" Swift host libraries using CMake's Swift support.

Instead, introduce `add_pure_swift_host_library` to centralize all of
the hacks to build a host library that's all Swift, using CMake's
support directly (rather than custom commands), and link against the
swift-syntax stack. Switch ASTGen directly over to this.

Add `add_swift_macro_library` on top of this, to make it easy to
create a macro library and install it into the appopriate plugin
directory. Switch ObservationMacros over to this.
2023-03-03 14:01:30 -08:00
Philippe Hausler
40c277b245 Observation and associated macros 2023-03-02 15:30:59 -08:00