llvm.org GIT mirror llvm / eb720cc
Darwin builds: handle different possible form for SDKROOT. Modifying build_llvm to handle SDKROOT being the name of an SDK rather than a path. This will still work if SDKROOT is a path. rdar://problem/15162322 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201560 91177308-0d34-0410-b5e6-96231b3b80d8 Tim Northover 5 years ago
1 changed file(s) with 6 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
8888 LLVM_VERSION="$LLVM_SUBMIT_VERSION-$LLVM_SUBMIT_SUBVERSION"
8989 fi
9090
91 SDKROOT_PATH=`xcodebuild -version -sdk $SDKROOT Path`
92
9193 # Figure out how many make processes to run.
9294 SYSCTL=`sysctl -n hw.activecpu`
9395 # sysctl -n hw.* does not work when invoked via B&I chroot /BuildRoot.
108110
109111 COMMON_MAKEFLAGS="\
110112 UNIVERSAL=1 \
111 UNIVERSAL_SDK_PATH=$SDKROOT \
113 UNIVERSAL_SDK_PATH=$SDKROOT_PATH \
112114 NO_RUNTIME_LIBS=1 \
113115 DISABLE_EDIS=1 \
114116 REQUIRES_RTTI=1 \
140142 T=`xcrun -sdk $SDKROOT -find ${prog}`
141143 ln -s $T $DIR/bin/$prog
142144 echo '#!/bin/sh' > $P || exit 1
143 echo 'exec '$T' -arch armv7 -isysroot '${SDKROOT}' "$@"' >> $P || exit 1
145 echo 'exec '$T' -arch armv7 -isysroot '${SDKROOT_PATH}' "$@"' >> $P || exit 1
144146 chmod a+x $P || exit 1
145147 done
146148
192194 fi
193195 fi
194196
195 if [ $SDKROOT ]; then
196 CPPFLAGS="$CPPFLAGS -isysroot $SDKROOT"
197 if [ $SDKROOT_PATH ]; then
198 CPPFLAGS="$CPPFLAGS -isysroot $SDKROOT_PATH"
197199 fi
198200 for host in $HOSTS; do :; done
199201 CPPFLAGS="$CPPFLAGS -arch $host"