Description
Currently we support prebuilts for macro targets and for their dependencies that are only used by macro targets. These are the only targets we know for sure are only built for the host platform. Prebuilts are setup before we know what the build destination is and previously we didn't have a good way to specify that with SwiftBuild.
Now that Swift SDKs are supported in SwiftBuild I think we have a good change to extend prebuilt for all target builds for the host platform. SwiftBuild does a good job of separating them. We just need a way to specify in the PIF to use the prebuilt if building for host and to build swift-syntax (our only prebuilt at the moment) from source when the build is not for host.
This is especially important for packages that have code generator executable targets as plugin tools that may be built for both. At least we can speed up builds when they are being built for host to be executed from the build graph.
BTW, Also do this with the Native build system. There we can take advantage of the fact we do two separate build graphs for the host and target destinations and can use prebuilt from the host one.
Description
Currently we support prebuilts for macro targets and for their dependencies that are only used by macro targets. These are the only targets we know for sure are only built for the host platform. Prebuilts are setup before we know what the build destination is and previously we didn't have a good way to specify that with SwiftBuild.
Now that Swift SDKs are supported in SwiftBuild I think we have a good change to extend prebuilt for all target builds for the host platform. SwiftBuild does a good job of separating them. We just need a way to specify in the PIF to use the prebuilt if building for host and to build swift-syntax (our only prebuilt at the moment) from source when the build is not for host.
This is especially important for packages that have code generator executable targets as plugin tools that may be built for both. At least we can speed up builds when they are being built for host to be executed from the build graph.
BTW, Also do this with the Native build system. There we can take advantage of the fact we do two separate build graphs for the host and target destinations and can use prebuilt from the host one.