depot/pkgs/development/compilers/swift/swiftpm/patches/disable-index-store.patch
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

23 lines
865 B
Diff

The `-index-store-path` option is an Apple extension not available in our
Clang. Make it opt-in by default.
(It is assumed the `target.type == test` check is for Xcode support, because
there is no evidence of it in swift-corelibs-xctest.)
--- a/Sources/Build/BuildPlan.swift
+++ b/Sources/Build/BuildPlan.swift
@@ -103,14 +103,7 @@ extension BuildParameters {
case .off:
addIndexStoreArguments = false
case .auto:
- if configuration == .debug {
- addIndexStoreArguments = true
- } else if target.type == .test {
- // Test discovery requires an index store for the test target to discover the tests
- addIndexStoreArguments = true
- } else {
addIndexStoreArguments = false
- }
}
if addIndexStoreArguments {