Open rauhul opened 9 months ago
Plugins don't follow the regular build at all and are currently always build in debug mode, but if we had an option to select the build configuration we could easily change that.
Things are more tricky for targets in the regular build graph because this implies that we need the ability to build multiple copies of targets, e.g. if you have a macro and are building a product that uses swift-syntax in debug mode in the same build graph.
Definitely introduces complexity to spm but I think it's both warranted and necessary. In medium to large use of swift-mmio, I see the emit-module time drop from ~2.5m to ~20s after switching from debug to release.
Targets which depend on macros and plugins should use release variants of those tools even if the target itself is being built in debug mode.
An optional flag can be used to build the host tools in debug.