#
# Test that cfstring literals are coalesced and dead stripped
# There is 3 CFSTR in foo.c and 1 CFSTR in bar.c
#
# Test that cfstring literals are coalesced and dead stripped
# There is 3 CFSTR in foo.c and 1 CFSTR in bar.c
${CC} ${CCFLAGS} foo.c bar.c -o foo -framework CoreFoundation -dead_strip
size -l foo | grep "__cfstring: ${CFSTRING_SIZE}" | ${FAIL_IF_EMPTY}
# now try with -fwritable-strings
${CC} ${CCFLAGS} foo.c bar.c -o foo -framework CoreFoundation -dead_strip
size -l foo | grep "__cfstring: ${CFSTRING_SIZE}" | ${FAIL_IF_EMPTY}
# now try with -fwritable-strings
- ${CC} ${CCFLAGS} foo.c bar.c -o foo_writable -framework CoreFoundation -dead_strip -fwritable-strings
- size -l foo_writable | grep "__cfstring: ${CFSTRING_SIZE_WRITABLE}" | ${PASS_IFF_STDIN}
+ ${CC} ${CCFLAGS} foo.c bar.c -o foo_writable -framework CoreFoundation -dead_strip -fwritable-strings 2>/dev/null
+ size -l foo_writable | grep "__cfstring: ${CFSTRING_SIZE}" | ${PASS_IFF_STDIN}