Commit 46df1b57 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

compile.sh: Add HAS_CLANG/HAS_GCC variables

parent 909479e2
......@@ -61,6 +61,12 @@ case "$2" in
;;
esac
if ${COMPILER} --version | grep -q gcc; then
HAS_GCC=1
else
HAS_CLANG=1
fi
# 1/ libvlc, libvlccore and its plugins
TESTED_HASH=45df8a6415
if [ ! -d "vlc" ]; then
......@@ -101,11 +107,12 @@ export PATH=`pwd`/build/bin:$PATH
cd ../../
TARGET_TUPLE=${1}-w64-mingw32
case "${1}" in
*)
COMPILER=${TARGET_TUPLE}-gcc
COMPILERXX=${TARGET_TUPLE}-g++
if ${COMPILER} --version | grep -q gcc; then
if [ -z "${HAS_GCC}" = 1 ]; then
${COMPILER} -dumpspecs | sed -e "s/-lmingwex/-lwinstorecompat -lmingwex -lwinstorecompat $LIBLOLE32 -lruntimeobject -lsynchronization/" -e "s/-lmsvcrt/$RUNTIME_EXTRA -l$RUNTIME/" -e "s/-lkernel32/$LIBKERNEL32/" > ../newspecfile
NEWSPECFILE="`pwd`/../newspecfile"
COMPILER="${COMPILER} -specs=$NEWSPECFILE"
......@@ -117,7 +124,7 @@ esac
EXTRA_CPPFLAGS="-D_WIN32_WINNT=$WINVER -DWINVER=$WINVER -DWINSTORECOMPAT -D_UNICODE -DUNICODE -DWINAPI_FAMILY=WINAPI_FAMILY_APP"
if ${COMPILER} --version | grep -q gcc; then
if [ -z "${HAS_GCC}" = 1 ]; then
EXTRA_LDFLAGS="-lnormaliz -lwinstorecompat -lruntimeobject"
else
# Clang doesn't support spec files, but will skip the builtin -lmsvcrt and -lkernel32 etc if it detects -lmsvcr* or -lucrt*, and
......
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