bazelbuild / rules_swift

Bazel rules to build Swift on Apple and Linux platforms
Apache License 2.0
307 stars 133 forks source link

Add index-while-building support (back) to the Swift build rules #1248

Closed brentleyjones closed 1 month ago

brentleyjones commented 1 month ago

When the swift.index_while_building feature is set, targets will emit an indexstore directory to the "indexstore" output group.

Unlike the original implementation, this one is focused on the remote indexing use case, so we don't support the old behavior meant for local builds of scanning --swiftcopt for a manually-specified path that would be the destination for all index data. Users who want to do that should just pass all of the indexing flags to --swiftcopt instead of using this feature.

PiperOrigin-RevId: 459613898 (cherry picked from commit 8150427e09350638381c3fd7a7b21b3783a8ad9e)


Cherry-pick notes: we never removed this. This is mainly just moving things around to make future cherry-picks easier. Though, we did take the --swiftcopt change by removing _is_index_store_path_overridden (which is a breaking change).