]>
git.saurik.com Git - apple/libc.git/blob - xcodescripts/build_linklists.sh
6 # Skip script during installhdrs
7 if [ "$ACTION" == installhdrs
]; then exit 0; fi
8 # BUILD_ARCHIVES needs to be set in the project settings
9 if [ -z "$BUILD_ARCHIVES" ]; then exit 0; fi
11 [ ! -d "$BUILT_PRODUCTS_DIR" ] && mkdir -p "$BUILT_PRODUCTS_DIR"
12 [ ! -d "$DERIVED_FILES_DIR" ] && mkdir -p "$DERIVED_FILES_DIR"
14 NORMAL_LIST
="$BUILT_PRODUCTS_DIR/normal.linklist"
15 DEBUG_LIST
="$BUILT_PRODUCTS_DIR/debug.linklist"
16 INTERPOSABLE_LIST
="$DERIVED_FILES_DIR/interposable.list"
17 UNEXPORT_LIST
="$DERIVED_FILES_DIR/unexport.list"
21 rm -f $INTERPOSABLE_LIST
24 for x
in ${BUILD_ARCHIVES[@]}; do
25 nm
-AUamgf "$BUILT_PRODUCTS_DIR/lib${x}.a" 2>/dev
/null
| \
26 grep '__TEXT,__text' | \
27 grep -vE '\$VARIANT' | \
28 awk '{ print $NF }' >> $INTERPOSABLE_LIST
30 nm
-AUamgf "$BUILT_PRODUCTS_DIR/lib${x}.a" 2>/dev
/null
| \
31 awk '/\$VARIANT/ { print $NF }' >> $UNEXPORT_LIST
33 echo "$BUILT_PRODUCTS_DIR/lib${x}.a" >> $NORMAL_LIST
34 echo "$BUILT_PRODUCTS_DIR/lib${x}_debug.a" >> $DEBUG_LIST
37 touch "$BUILT_PRODUCTS_DIR/deps.c"