about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-index-store.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-index-store.patch')
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-index-store.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-index-store.patch b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-index-store.patch
new file mode 100644
index 000000000000..bef8d43a0dbc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-index-store.patch
@@ -0,0 +1,23 @@
+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 {