llvm.org GIT mirror llvm / 0dfa8a6
Preprocess Apple llvmCore headers to reflect NDEBUG setting. <rdar://12568983> If an Apple llvmCore build is done without assertions, and a client uses the llvmCore headers with assertions enabled, or vice versa, then things will break because some of the structure sizes in the API are different. Use the unifdef tool to make the headers unconditionally match the way the llvmCore libraries were built. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174460 91177308-0d34-0410-b5e6-96231b3b80d8 Bob Wilson 6 years ago
1 changed file(s) with 10 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
233233 echo "#define LLVM_VERSION ${RC_ProjectSourceVersion}" > $DEST_DIR$DEST_ROOT/include/llvm/Version.h
234234 echo "#define LLVM_MINOR_VERSION ${RC_ProjectSourceSubversion}" >> $DEST_DIR$DEST_ROOT/include/llvm/Version.h
236 # Run unifdef to preprocess the installed headers to reflect whether this
237 # was a debug or release build.
238 for file in `find $DEST_DIR$DEST_ROOT/include -type f -print`; do
239 if [ "$LLVM_ASSERTIONS" = yes ]; then
240 unifdef -UNDEBUG -D_DEBUG -o $file $file
241 else
242 unifdef -DNDEBUG -U_DEBUG -ULLVM_ENABLE_DUMP -o $file $file
243 fi
244 done
236246 # Find the right version of strip to use.
237247 STRIP=strip
238248 if [ -n "$SDKROOT" ]; then