about summary refs log tree commit diff
path: root/pkgs/development/compilers/swift/swift-driver/patches/nix-resource-root.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/swift/swift-driver/patches/nix-resource-root.patch')
-rw-r--r--pkgs/development/compilers/swift/swift-driver/patches/nix-resource-root.patch28
1 files changed, 0 insertions, 28 deletions
diff --git a/pkgs/development/compilers/swift/swift-driver/patches/nix-resource-root.patch b/pkgs/development/compilers/swift/swift-driver/patches/nix-resource-root.patch
deleted file mode 100644
index 8c24db5aad1d..000000000000
--- a/pkgs/development/compilers/swift/swift-driver/patches/nix-resource-root.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Swift normally looks for the Clang resource dir in a subdir/symlink of its own
-resource dir. We provide a symlink to the Swift build-time Clang as a default
-there, but we also here patch a check to try locate it via NIX_CC.
-
---- a/Sources/SwiftDriver/Jobs/Toolchain+LinkerSupport.swift
-+++ b/Sources/SwiftDriver/Jobs/Toolchain+LinkerSupport.swift
-@@ -10,6 +10,7 @@
- //
- //===----------------------------------------------------------------------===//
- 
-+import Foundation
- import SwiftOptions
- 
- import protocol TSCBasic.FileSystem
-@@ -26,6 +27,13 @@ extension Toolchain {
-     for targetInfo: FrontendTargetInfo,
-     parsedOptions: inout ParsedOptions
-   ) throws -> VirtualPath {
-+    let env = ProcessInfo.processInfo.environment
-+    if let nixCC = env["NIX_CC"] {
-+      return try VirtualPath(path: nixCC)
-+        .appending(components: "resource-root", "lib",
-+                   targetInfo.target.triple.platformName(conflatingDarwin: true)!)
-+    }
-+
-     return VirtualPath.lookup(targetInfo.runtimeResourcePath.path)
-       .appending(components: "clang", "lib",
-                  targetInfo.target.triple.platformName(conflatingDarwin: true)!)