Bug 1022349 - Part 2: Use clang-cl when building libffi if we're building with clang-cl; r=glandium

This commit is contained in:
Ehsan Akhgari 2014-06-13 08:28:29 -04:00
Родитель baa0f6a89d
Коммит 2090d6f39b
1 изменённых файлов: 12 добавлений и 9 удалений

Просмотреть файл

@ -46,23 +46,26 @@ if test -z "$BUILDING_JS" -o -n "$JS_STANDALONE"; then
# autotools can't quite handle an MSVC build environment yet.
LDFLAGS=
CFLAGS=
ac_configure_args="$ac_configure_args LD=link CPP=\"cl -nologo -EP\" \
CXXCPP=\"cl -nologo -EP\" SHELL=sh.exe"
rtl=
if test -z "$MOZ_NO_DEBUG_RTL" -a -n "$MOZ_DEBUG"; then
rtl=" -DUSE_DEBUG_RTL"
ac_configure_args="$ac_configure_args LD=link CPP=\"$CC -nologo -EP\" \
CXXCPP=\"$CXX -nologo -EP\" SHELL=sh.exe"
flags=
if test -z "$MOZ_NO_DEBUG_flags" -a -n "$MOZ_DEBUG"; then
flags=" -DUSE_DEBUG_RTL"
fi
if test -n "$CLANG_CL"; then
flags="$flags -clang-cl"
fi
case "${target_cpu}" in
x86_64)
# Need target since MSYS tools into mozilla-build may be 32bit
ac_configure_args="$ac_configure_args \
CC=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh -m64$rtl\" \
CXX=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh -m64$rtl\""
CC=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh -m64$flags\" \
CXX=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh -m64$flags\""
;;
*)
ac_configure_args="$ac_configure_args \
CC=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh$rtl\" \
CXX=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh$rtl\""
CC=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh$flags\" \
CXX=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh$flags\""
;;
esac
fi