Only set sysroot when alt_libc finds a directory

Change-Id: Idc0a9adb4fb371272d6c8c98737f66c6cf209e37
This commit is contained in:
Johann
2015-10-27 15:38:47 -07:00
parent dc9d36c0a6
commit a6f70b42b6

View File

@@ -979,8 +979,10 @@ EOF
awk '{ print $1 }' | tail -1`
fi
add_cflags "--sysroot=${alt_libc}"
add_ldflags "--sysroot=${alt_libc}"
if [ -d "${alt_libc}" ]; then
add_cflags "--sysroot=${alt_libc}"
add_ldflags "--sysroot=${alt_libc}"
fi
# linker flag that routes around a CPU bug in some
# Cortex-A8 implementations (NDK Dev Guide)