do not set all these variables unless building cores

This commit is contained in:
radius 2015-10-21 17:51:31 -05:00
parent 51ff4a76be
commit a071920a69
28 changed files with 157 additions and 132 deletions

View File

@ -35,8 +35,137 @@ done < $1.conf
echo echo
echo echo
if [ "${CORE_JOB}" == "YES" ]; then
echo === BUILDBOT VARS: $LOGDATE BOTNAME: $BOT FORCE: $FORCE JOBS: $JOBS ===
# set format_compiler_target
[[ "${ARM_NEON}" ]] && echo 'ARM NEON opts enabled...' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-neon"
[[ "${CORTEX_A8}" ]] && echo 'Cortex A8 opts enabled...' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-cortexa8"
[[ "${CORTEX_A9}" ]] && echo 'Cortex A9 opts enabled...' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-cortexa9"
[[ "${ARM_HARDFLOAT}" ]] && echo 'ARM hardfloat ABI enabled...' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-hardfloat"
[[ "${ARM_SOFTFLOAT}" ]] && echo 'ARM softfloat ABI enabled...' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-softfloat"
[[ "${IOS}" ]] && echo 'iOS detected...'
read_link()
{
TARGET_FILE="$1"
cd $(dirname "$TARGET_FILE")
TARGET_FILE=$(basename "$TARGET_FILE")
while [ -L "$TARGET_FILE" ]; do
TARGET_FILE=$(readlink "$TARGET_FILE")
cd $(dirname "$TARGET_FILE")
TARGET_FILE=$(basename "$TARGET_FILE")
done
PHYS_DIR=$(pwd -P)
RESULT="$PHYS_DIR/$TARGET_FILE"
echo $RESULT
}
SCRIPT=$(read_link "$0")
echo "SCRIPT: $SCRIPT"
BASE_DIR=$(dirname "$SCRIPT")
if [ -z "$RARCH_DIST_DIR" ]; then
RARCH_DIR="$BASE_DIR/dist"
RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR"
fi
# create the folder that will hold compiled cores
mkdir -v -p "$RARCH_DIST_DIR"
# create the folder for each androi abi
if [ "${PLATFORM}" = "android" ]; then
IFS=' ' read -ra ABIS <<< "$TARGET_ABIS"
for a in "${ABIS[@]}"; do
echo $a
if [ -d $RARCH_DIST_DIR/${a} ]; then
echo "Directory $RARCH_DIST_DIR/${a} already exists, skipping creation..."
else
mkdir $RARCH_DIST_DIR/${a}
fi
done
fi
# define the compilers
if [ "$HOST_CC" ]; then
CC="${HOST_CC}-gcc"
CXX="${HOST_CC}-g++"
CXX11="${HOST_CC}-g++"
STRIP="${HOST_CC}-strip"
fi
if [ -z "$MAKE" ]; then
if uname -s | grep -i MINGW32 > /dev/null 2>&1; then
MAKE=mingw32-make
else
if type gmake > /dev/null 2>&1; then
MAKE=gmake
else
MAKE=make
fi
fi
fi
if [ -z "$CC" ]; then
if [ $FORMAT_COMPILER_TARGET = "osx" ]; then
CC=cc
elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then
CC=mingw32-gcc
else
CC=gcc
fi
fi
if [ -z "$CXX" ]; then
if [ $FORMAT_COMPILER_TARGET = "osx" ]; then
CXX=c++
CXX11="clang++ -std=c++11 -stdlib=libc++"
elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then
CXX=mingw32-g++
CXX11=mingw32-g++
else
CXX=g++
CXX11=g++
fi
fi
if [ "${CC}" ] && [ "${CXX}" ]; then
COMPILER="CC=${CC} CXX=${CXX}"
else
COMPILER=""
fi
echo === BUILDBOT VARS: CC: $CC CXX:: $CXX STRIP: $STRIP COMPILER: $COMPILER ===
export CC=$CC
export CXX=$CXX
RESET_FORMAT_COMPILER_TARGET=$FORMAT_COMPILER_TARGET
RESET_FORMAT_COMPILER_TARGET_ALT=$FORMAT_COMPILER_TARGET_ALT
check_opengl() {
if [ "${BUILD_LIBRETRO_GL}" ]; then
if [ "${ENABLE_GLES}" ]; then
echo '=== OpenGL ES enabled ==='
export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-gles"
export FORMAT_COMPILER_TARGET_ALT="${FORMAT_COMPILER_TARGET}"
else
echo '=== OpenGL enabled ==='
export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-opengl"
export FORMAT_COMPILER_TARGET_ALT="${FORMAT_COMPILER_TARGET}"
fi
else
echo '=== OpenGL disabled in build ==='
fi
}
reset_compiler_targets() {
export FORMAT_COMPILER_TARGET=$RESET_FORMAT_COMPILER_TARGET
export FORMAT_COMPILER_TARGET_ALT=$RESET_FORMAT_COMPILER_TARGET_ALT
}
fi
# set a few extra variables with libretro-config.sh # set a few extra variables with libretro-config.sh
#. $WORK/libretro-config.sh . $WORK/libretro-config.sh
# set jobs to 2 if not specified # set jobs to 2 if not specified
if [ -z "$JOBS" ]; then if [ -z "$JOBS" ]; then
@ -63,133 +192,6 @@ CORES_BUILT=NO
OLDFORCE=$FORCE OLDFORCE=$FORCE
OLDJ=$JOBS OLDJ=$JOBS
echo === BUILDBOT VARS: $LOGDATE BOTNAME: $BOT FORCE: $FORCE JOBS: $JOBS ===
# set format_compiler_target
[[ "${ARM_NEON}" ]] && echo 'ARM NEON opts enabled...' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-neon"
[[ "${CORTEX_A8}" ]] && echo 'Cortex A8 opts enabled...' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-cortexa8"
[[ "${CORTEX_A9}" ]] && echo 'Cortex A9 opts enabled...' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-cortexa9"
[[ "${ARM_HARDFLOAT}" ]] && echo 'ARM hardfloat ABI enabled...' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-hardfloat"
[[ "${ARM_SOFTFLOAT}" ]] && echo 'ARM softfloat ABI enabled...' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-softfloat"
[[ "${IOS}" ]] && echo 'iOS detected...'
read_link()
{
TARGET_FILE="$1"
cd $(dirname "$TARGET_FILE")
TARGET_FILE=$(basename "$TARGET_FILE")
while [ -L "$TARGET_FILE" ]; do
TARGET_FILE=$(readlink "$TARGET_FILE")
cd $(dirname "$TARGET_FILE")
TARGET_FILE=$(basename "$TARGET_FILE")
done
PHYS_DIR=$(pwd -P)
RESULT="$PHYS_DIR/$TARGET_FILE"
echo $RESULT
}
SCRIPT=$(read_link "$0")
echo "SCRIPT: $SCRIPT"
BASE_DIR=$(dirname "$SCRIPT")
if [ -z "$RARCH_DIST_DIR" ]; then
RARCH_DIR="$BASE_DIR/dist"
RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR"
fi
# create the folder that will hold compiled cores
mkdir -v -p "$RARCH_DIST_DIR"
# create the folder for each androi abi
if [ "${PLATFORM}" = "android" ]; then
IFS=' ' read -ra ABIS <<< "$TARGET_ABIS"
for a in "${ABIS[@]}"; do
echo $a
if [ -d $RARCH_DIST_DIR/${a} ]; then
echo "Directory $RARCH_DIST_DIR/${a} already exists, skipping creation..."
else
mkdir $RARCH_DIST_DIR/${a}
fi
done
fi
# define the compilers
#if [ "$HOST_CC" ]; then
# CC="${HOST_CC}-gcc"
# CXX="${HOST_CC}-g++"
# CXX11="${HOST_CC}-g++"
# STRIP="${HOST_CC}-strip"
#fi
#if [ -z "$MAKE" ]; then
# if uname -s | grep -i MINGW32 > /dev/null 2>&1; then
# MAKE=mingw32-make
# else
# if type gmake > /dev/null 2>&1; then
# MAKE=gmake
# else
# MAKE=make
# fi
# fi
#fi
#if [ -z "$CC" ]; then
# if [ $FORMAT_COMPILER_TARGET = "osx" ]; then
# CC=cc
# elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then
# CC=mingw32-gcc
# else
# CC=gcc
# fi
#fi
#if [ -z "$CXX" ]; then
# if [ $FORMAT_COMPILER_TARGET = "osx" ]; then
# CXX=c++
# CXX11="clang++ -std=c++11 -stdlib=libc++"
# elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then
# CXX=mingw32-g++
# CXX11=mingw32-g++
# else
# CXX=g++
# CXX11=g++
# fi
#fi
#if [ "${CC}" ] && [ "${CXX}" ]; then
# COMPILER="CC=${CC} CXX=${CXX}"
#else
# COMPILER=""
#fi
echo === BUILDBOT VARS: CC: $CC CXX:: $CXX STRIP: $STRIP COMPILER: $COMPILER ===
#export CC=$CC
#export CXX=$CXX
RESET_FORMAT_COMPILER_TARGET=$FORMAT_COMPILER_TARGET
RESET_FORMAT_COMPILER_TARGET_ALT=$FORMAT_COMPILER_TARGET_ALT
check_opengl() {
if [ "${BUILD_LIBRETRO_GL}" ]; then
if [ "${ENABLE_GLES}" ]; then
echo '=== OpenGL ES enabled ==='
export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-gles"
export FORMAT_COMPILER_TARGET_ALT="${FORMAT_COMPILER_TARGET}"
else
echo '=== OpenGL enabled ==='
export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-opengl"
export FORMAT_COMPILER_TARGET_ALT="${FORMAT_COMPILER_TARGET}"
fi
else
echo '=== OpenGL disabled in build ==='
fi
}
reset_compiler_targets() {
export FORMAT_COMPILER_TARGET=$RESET_FORMAT_COMPILER_TARGET
export FORMAT_COMPILER_TARGET_ALT=$RESET_FORMAT_COMPILER_TARGET_ALT
}
cd "${BASE_DIR}" cd "${BASE_DIR}"
# build commands # build commands
@ -1156,8 +1158,6 @@ if [ "${PLATFORM}" == "ios" ] && [ "${RA}" == "YES" ]; then
echo "BUILDBOT JOB: $jobid Building" echo "BUILDBOT JOB: $jobid Building"
echo echo
echo $CC
echo $GCC
cd pkg/apple cd pkg/apple
xcodebuild clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -project RetroArch_iOS.xcodeproj -configuration Release &> $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log xcodebuild clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -project RetroArch_iOS.xcodeproj -configuration Release &> $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log

View File

@ -7,3 +7,4 @@ PLATFORM android
platform android platform android
MAKE make MAKE make
LIBSUFFIX _android LIBSUFFIX _android
CORE_JOB YES

View File

@ -7,3 +7,4 @@ platform android
NDK ndk-build NDK ndk-build
RA NO RA NO
LIBSUFFIX _android LIBSUFFIX _android
CORE_JOB YES

View File

@ -3,3 +3,4 @@ PLATFORM android-armv7
platform android-armv7 platform android-armv7
LIBSUFFIX _android LIBSUFFIX _android
MAKE make MAKE make
CORE_JOB YES

View File

@ -6,3 +6,4 @@ platform android
LIBSUFFIX _android LIBSUFFIX _android
MAKE make MAKE make
DIST armeabi-v7a DIST armeabi-v7a
CORE_JOB YES

View File

@ -8,3 +8,4 @@ MAKE make
NDK ndk-build NDK ndk-build
RA YES RA YES
LIBSUFFIX _android LIBSUFFIX _android
CORE_JOB YES

View File

@ -1,2 +1,3 @@
platform ios platform ios
PLATFORM ios PLATFORM ios
CORE_JOB YES

View File

@ -1,2 +1,3 @@
platform ios9 platform ios9
PLATFORM ios9 PLATFORM ios9
CORE_JOB YES

View File

@ -1,2 +1,3 @@
platform osx platform osx
PLATFORM osx PLATFORM osx
CORE_JOB YES

View File

@ -1,2 +1,3 @@
platform qnx platform qnx
PLATFORM qnx PLATFORM qnx
CORE_JOB YES

View File

@ -1,3 +1,4 @@
platform unix platform unix
PLATFORM unix PLATFORM unix
MAKEPORTABLE YES MAKEPORTABLE YES
CORE_JOB YES

View File

@ -1,3 +1,4 @@
platform linux platform linux
PLATFORM linux PLATFORM linux
MAKEPORTABLE YES MAKEPORTABLE YES
CORE_JOB YES

View File

@ -1,3 +1,4 @@
platform unix platform unix
PLATFORM unix PLATFORM unix
MAKEPORTABLE YES MAKEPORTABLE YES
CORE_JOB YES

View File

@ -1,3 +1,4 @@
platform unix platform unix
PLATFORM unix PLATFORM unix
MAKEPORTABLE YES MAKEPORTABLE YES
CORE_JOB YES

View File

@ -1,2 +1,3 @@
platform unix platform unix
MAKEPORTABLE YES MAKEPORTABLE YES
CORE_JOB YES

View File

@ -6,4 +6,5 @@ DEVKITARM /home/buildbot/tools/devkitpro/devkitARM
CTRULIB /home/buildbot/tools/devkitpro/ctrulib/libctru CTRULIB /home/buildbot/tools/devkitpro/ctrulib/libctru
AEMSTRO /home/buildbot/tools/devkitpro/aemstro AEMSTRO /home/buildbot/tools/devkitpro/aemstro
RA YES RA YES
CORE_JOB YES
JOBS 4 JOBS 4

View File

@ -8,3 +8,4 @@ DEVKITPRO /home/buildbot/tools/devkitpro
DEVKITPPC /home/buildbot/tools/devkitpro/devkitPPC DEVKITPPC /home/buildbot/tools/devkitpro/devkitPPC
RA YES RA YES
JOBS 4 JOBS 4
CORE_JOB YES

View File

@ -9,3 +9,4 @@ DEVKITPPC /home/buildbot/tools/devkitpro/devkitPPC
DEVKITPPC_ROOT_DIR /home/buildbot/tools/devkitpro/devkitPPC DEVKITPPC_ROOT_DIR /home/buildbot/tools/devkitpro/devkitPPC
RA YES RA YES
JOBS 4 JOBS 4
CORE_JOB YES

View File

@ -7,3 +7,4 @@ CC psp-gcc
CXX psp-g++ CXX psp-g++
MAKE /usr/bin/make MAKE /usr/bin/make
RA YES RA YES
CORE_JOB YES

View File

@ -4,3 +4,4 @@ PLATFORM vita
VITASDK /home/buildbot/tools/psv/ VITASDK /home/buildbot/tools/psv/
RA YES RA YES
JOBS 4 JOBS 4
CORE_JOB YES

View File

@ -6,5 +6,4 @@ MAKE mingw32-make.exe
CC gcc CC gcc
CXX g++ CXX g++
CXX11 g++ CXX11 g++
CORE_JOB YES

View File

@ -6,3 +6,4 @@ MAKE make.exe
CC gcc CC gcc
CXX g++ CXX g++
CXX11 g++ CXX11 g++
CORE_JOB YES

View File

@ -6,3 +6,4 @@ MAKE mingw32-make.exe
CC gcc CC gcc
CXX g++ CXX g++
CXX11 g++ CXX11 g++
CORE_JOB YES

View File

@ -6,3 +6,4 @@ ARCH x86
MAKE mingw32-make.exe MAKE mingw32-make.exe
CC gcc CC gcc
CXX g++ CXX g++
CORE_JOB YES

View File

@ -6,3 +6,4 @@ MAKE mingw32-make.exe
CC gcc CC gcc
CXX g++ CXX g++
CXX11 g++ CXX11 g++
CORE_JOB YES

View File

@ -8,3 +8,4 @@ CC gcc
CXX g++ CXX g++
CXX11 g++ CXX11 g++
PTR64 1 PTR64 1
CORE_JOB YES

View File

@ -7,3 +7,4 @@ MAKE make
CC gcc CC gcc
CXX g++ CXX g++
PTR64 1 PTR64 1
CORE_JOB YES

View File

@ -6,3 +6,4 @@ ARCH x86
MAKE mingw32-make.exe MAKE mingw32-make.exe
CC gcc CC gcc
CXX g++ CXX g++
CORE_JOB YES