mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-30 08:44:48 +00:00
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. llvm-svn: 174460
This commit is contained in:
parent
2e729a5aff
commit
0c5819e04c
@ -234,6 +234,16 @@ RC_ProjectSourceSubversion=`printf "%d" $LLVM_MINOR_VERSION`
|
||||
echo "#define LLVM_VERSION ${RC_ProjectSourceVersion}" > $DEST_DIR$DEST_ROOT/include/llvm/Version.h
|
||||
echo "#define LLVM_MINOR_VERSION ${RC_ProjectSourceSubversion}" >> $DEST_DIR$DEST_ROOT/include/llvm/Version.h
|
||||
|
||||
# Run unifdef to preprocess the installed headers to reflect whether this
|
||||
# was a debug or release build.
|
||||
for file in `find $DEST_DIR$DEST_ROOT/include -type f -print`; do
|
||||
if [ "$LLVM_ASSERTIONS" = yes ]; then
|
||||
unifdef -UNDEBUG -D_DEBUG -o $file $file
|
||||
else
|
||||
unifdef -DNDEBUG -U_DEBUG -ULLVM_ENABLE_DUMP -o $file $file
|
||||
fi
|
||||
done
|
||||
|
||||
# Find the right version of strip to use.
|
||||
STRIP=strip
|
||||
if [ -n "$SDKROOT" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user