summaryrefslogtreecommitdiff
path: root/data/llvm-clang/iphonesdkpath.diff
diff options
context:
space:
mode:
Diffstat (limited to 'data/llvm-clang/iphonesdkpath.diff')
-rw-r--r--data/llvm-clang/iphonesdkpath.diff46
1 files changed, 46 insertions, 0 deletions
diff --git a/data/llvm-clang/iphonesdkpath.diff b/data/llvm-clang/iphonesdkpath.diff
new file mode 100644
index 000000000..ace9daa10
--- /dev/null
+++ b/data/llvm-clang/iphonesdkpath.diff
@@ -0,0 +1,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);
+ }