Skip to content

Conversation

@ahoppen
Copy link
Member

@ahoppen ahoppen commented Nov 11, 2025

We were passing -index-store-compress to the compiler even though we don’t pass -index-store-path if INDEX_STORE_ENABLE = YES but COMPILER_INDEX_STORE_ENABLE = NO. This is because CLANG_INDEX_STORE_ENABLE still evaluated to YES and thus the Condition of CLANG_INDEX_STORE_COMPRESS also evaluated to YES but we didn’t pass -index-store-path because the condition of CLANG_INDEX_STORE_ENABLE evaluated to NO.

This was a misconception on my side when I added these build settings because I assumed that the Condition would influence the value of the build setting instead of just influencing ComandLineArgs.

I don’t like how we need to repeat the same condition in multiple build settings now but haven’t found a better solution.

rdar://164248532

We were passing `-index-store-compress` to the compiler even though we don’t pass `-index-store-path` if `INDEX_STORE_ENABLE = YES` but `COMPILER_INDEX_STORE_ENABLE = NO`. This is because `CLANG_INDEX_STORE_ENABLE` still evaluated to `YES` and thus the `Condition` of `CLANG_INDEX_STORE_COMPRESS` also evaluated to `YES` but we didn’t pass `-index-store-path` because the condition of `CLANG_INDEX_STORE_ENABLE` evaluated to `NO`.

This was a misconception on my side when I added these build settings because I assumed that the `Condition` would influence the value of the build setting instead of just influencing `ComandLineArgs`.

I don’t like how we need to repeat the same condition in multiple build settings now but haven’t found a better solution.

rdar://164248532
@jakepetroules
Copy link
Collaborator

@swift-ci test

@ahoppen ahoppen merged commit 51fa0ae into swiftlang:main Nov 13, 2025
103 of 105 checks passed
@ahoppen ahoppen deleted the no-compress-if-index-disabled branch November 17, 2025 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants