Commit b046f5f4 authored by Felix Paul Kühne's avatar Felix Paul Kühne Committed by Soomin Lee

Clean the environment before running xcodebuild to fix linking for macOS

(cherry picked from commit 54af86fa)
parent f106e13c
...@@ -178,8 +178,28 @@ info() ...@@ -178,8 +178,28 @@ info()
echo "[${green}info${normal}] $1" echo "[${green}info${normal}] $1"
} }
cleantheenvironment()
{
export AS=""
export CCAS=""
export ASCPP=""
export CC=""
export CFLAGS=""
export CPPFLAGS=""
export CXX=""
export CXXFLAGS=""
export CXXCPPFLAGS=""
export OBJC=""
export OBJCFLAGS=""
export LD=""
export LDFLAGS=""
export STRIP=""
}
buildxcodeproj() buildxcodeproj()
{ {
cleantheenvironment
local target="$2" local target="$2"
local PLATFORM="$3" local PLATFORM="$3"
...@@ -214,6 +234,7 @@ buildxcodeproj() ...@@ -214,6 +234,7 @@ buildxcodeproj()
if [ "$SCARY" = "no" ]; then if [ "$SCARY" = "no" ]; then
defs="$defs NOSCARYCODECS" defs="$defs NOSCARYCODECS"
fi fi
xcodebuild -project "$1.xcodeproj" \ xcodebuild -project "$1.xcodeproj" \
-target "$target" \ -target "$target" \
-sdk $PLATFORM$SDK \ -sdk $PLATFORM$SDK \
...@@ -319,7 +340,7 @@ buildLibVLC() { ...@@ -319,7 +340,7 @@ buildLibVLC() {
PREFIX="${VLCROOT}/install-${OSSTYLE}${PLATFORM}/${ACTUAL_ARCH}" PREFIX="${VLCROOT}/install-${OSSTYLE}${PLATFORM}/${ACTUAL_ARCH}"
TARGET="${ARCH}-apple-darwin14" TARGET="${ARCH}-apple-darwin14"
# clean the environment # partially clean the environment
export CFLAGS="" export CFLAGS=""
export CPPFLAGS="" export CPPFLAGS=""
export CXXFLAGS="" export CXXFLAGS=""
...@@ -725,6 +746,8 @@ buildLibVLC() { ...@@ -725,6 +746,8 @@ buildLibVLC() {
buildMobileKit() { buildMobileKit() {
PLATFORM="$1" PLATFORM="$1"
cleantheenvironment
if [ "$SKIPLIBVLCCOMPILATION" != "yes" ]; then if [ "$SKIPLIBVLCCOMPILATION" != "yes" ]; then
if [ "$TVOS" = "yes" ]; then if [ "$TVOS" = "yes" ]; then
# this variable is read by libvlc's contrib build script # this variable is read by libvlc's contrib build script
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment