Skip to content

Commit 18297bc

Browse files
committed
fix symredirect-host-build for macos
1 parent 9d98e57 commit 18297bc

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

symredirect-host-build.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,21 @@
33
set -e
44
set -x
55

6-
echo "*** Cloning ld64 repository ..."
7-
[ -d ld64 ] && rm -rf ld64
8-
git clone https://github.com/ProcursusTeam/ld64.git
6+
if [ $(uname -s) != "Darwin" ]; then
7+
echo "*** Cloning ld64 repository ..."
8+
[ -d ld64 ] && rm -rf ld64
9+
git clone https://github.com/ProcursusTeam/ld64.git
910

10-
echo "*** Checking the non-darwin headers ..."
11-
if [ ! -d ./ld64/EXTERNAL_HEADERS/non-darwin ]; then
12-
echo "The non-darwin headers are not present in the ld64 repository."
11+
echo "*** Checking the non-darwin headers ..."
12+
if [ ! -d ./ld64/EXTERNAL_HEADERS/non-darwin ]; then
13+
echo "The non-darwin headers are not present in the ld64 repository."
14+
fi
15+
16+
EXTRA_HEADER_FLAG="-I./ld64/EXTERNAL_HEADERS/non-darwin"
1317
fi
1418

1519
echo "*** Building the symredirect-host executable ..."
16-
clang++ -v -std=c++11 -I./ld64/EXTERNAL_HEADERS/non-darwin -DVROOT_API_ALL -o symredirect-host symredirect.cpp
20+
clang++ -v -std=c++11 $EXTRA_HEADER_FLAG -o symredirect-host symredirect.cpp
1721

1822
echo "*** Checking built symredirect-host executable ..."
1923

0 commit comments

Comments
 (0)