Skip to content

Conversation

@ahoppen
Copy link
Member

@ahoppen ahoppen commented Nov 17, 2025

  • Explanation: 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.
  • Scope: Builds that set one of the index-related options introduced in Add build settings to control the emission of the Index Store #815
  • Issue: rdar://164248532
  • Original PR: Do not pass index store options if indexing is disabled #903
  • Risk: Low, the options affected by this have not been released yet
  • Testing: Added unit tests
  • Reviewer: @jakepetroules @neonichu

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
@ahoppen
Copy link
Member Author

ahoppen commented Nov 17, 2025

@swift-ci Please test

@owenv
Copy link
Collaborator

owenv commented Nov 17, 2025

@ahoppen we're going to end up auto merging main into 6.3 for a bit so this should get included automatically once the first 6.3 toolchain gets released to unblock CI

@ahoppen
Copy link
Member Author

ahoppen commented Nov 18, 2025

👍 Even better

@ahoppen ahoppen closed this Nov 18, 2025
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.

2 participants