summaryrefslogtreecommitdiff
path: root/data/llvm-clang/iphonesdkpath.diff
blob: ace9daa10277d243e61c0c923b0eaf5a50104271 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
diff -ur swift-llvm-swift-4.1.3-RELEASE/tools/clang/lib/Frontend/InitHeaderSearch.cpp swift-llvm-swift-4.1.3-RELEASE+iPhone/tools/clang/lib/Frontend/InitHeaderSearch.cpp
--- swift-llvm-swift-4.1.3-RELEASE/tools/clang/lib/Frontend/InitHeaderSearch.cpp	2018-03-17 03:34:33.000000000 -1000
+++ swift-llvm-swift-4.1.3-RELEASE+iPhone/tools/clang/lib/Frontend/InitHeaderSearch.cpp	2018-09-17 12:26:55.000000000 -1000
@@ -348,6 +348,9 @@
   }
   default:
     AddPath("/usr/include", ExternCSystem, false);
+    if (!HasSysroot) {
+      AddPath("/usr/share/SDKs/iPhoneOS.sdk/usr/include", ExternCSystem, false);
+    }
     break;
   }
 }
@@ -385,11 +388,21 @@
                                   "arm-apple-darwin10", "v7", "", triple);
       AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.2.1",
                                   "arm-apple-darwin10", "v6", "", triple);
+      if (!HasSysroot) {
+        AddGnuCPlusPlusIncludePaths("/usr/share/SDKs/iPhoneOS.sdk/usr/include/c++/4.2.1",
+                                  "arm-apple-darwin10", "v7", "", triple);
+        AddGnuCPlusPlusIncludePaths("/usr/share/SDKs/iPhoneOS.sdk/usr/include/c++/4.2.1",
+                                  "arm-apple-darwin10", "v6", "", triple);
+      }
       break;
 
     case llvm::Triple::aarch64:
       AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.2.1",
                                   "arm64-apple-darwin10", "", "", triple);
+      if (!HasSysroot) {
+        AddGnuCPlusPlusIncludePaths("/usr/share/SDKs/iPhoneOS.sdk/usr/include/c++/4.2.1",
+                                  "arm64-apple-darwin10", "", "", triple);
+      }
       break;
     }
     return;
@@ -483,6 +496,10 @@
   // Add the default framework include paths on Darwin.
   if (HSOpts.UseStandardSystemIncludes) {
     if (triple.isOSDarwin()) {
+      if (!HasSysroot) {
+        AddPath("/usr/share/SDKs/iPhoneOS.sdk/System/Library/Frameworks", System, true);
+        AddPath("/usr/share/SDKs/iPhoneOS.sdk/Library/Frameworks", System, true);
+      }
       AddPath("/System/Library/Frameworks", System, true);
       AddPath("/Library/Frameworks", System, true);
     }