From 495662aac1cf95dc369d261f3d6e1db7bcb08965 Mon Sep 17 00:00:00 2001 From: Andrew Hyatt Date: Sat, 4 Aug 2018 13:21:58 -0400 Subject: [PATCH] Xcodeproj fixes (#411) --- .../Developer/SDKs/MacOSX.sdk/usr/include/c++ | 1 + .../Developer/SDKs/MacOSX.sdk/usr/include/wtf | 1 + .../XcodeDefault.xctoolchain/usr/bin/clang | 27 ++++++++++++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 120000 Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++ create mode 120000 Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wtf diff --git a/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++ b/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++ new file mode 120000 index 000000000..ef9677953 --- /dev/null +++ b/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++ @@ -0,0 +1 @@ +../../../../../../../../src/libstdcxx/include/c++ \ No newline at end of file diff --git a/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wtf b/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wtf new file mode 120000 index 000000000..06b93c8ae --- /dev/null +++ b/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wtf @@ -0,0 +1 @@ +../../../../../../../../src/external/WTF/include/wtf \ No newline at end of file diff --git a/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang b/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang index d7714cb0f..9687ab786 100755 --- a/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang +++ b/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang @@ -4,4 +4,29 @@ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/ga SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -clang -B $SCRIPTDIR -target darwin "$@" +foo="not" +extra=() + +array=( "$@" ) + +for i in "${array[@]}" +do + if [ "$i" = "-x" ] && [ "$foo" != "found" ] + then + foo="found" + continue + fi + if [ "$i" = "c++" ] || [ "$i" = "objective-c++" ] + then + if [ "$foo" == "found" ] + then + extra+=( -I$SCRIPTDIR/../include/c++/v1 ) + found="not" + fi + fi + +done + +extra+=( -I$SCRIPTDIR/../include ) + +clang -B $SCRIPTDIR -target darwin ${extra[@]} "$@"