Bug 1420165 - Enforce objective-c/c++ language type when compiling .m/mm files. r?Build
This work around is required when using icecream distributed compilers. Icecream doesn't pass the original filename that would allow the remote clang to automatically determine the language type.
MozReview-Commit-ID: LMs022jDkPt
--- a/old-configure.in
+++ b/old-configure.in
@@ -4785,20 +4785,20 @@ AC_SUBST_LIST(MOZ_BZ2_CFLAGS)
AC_SUBST_LIST(MOZ_BZ2_LIBS)
AC_SUBST_LIST(MOZ_PNG_CFLAGS)
AC_SUBST_LIST(MOZ_PNG_LIBS)
AC_SUBST(MOZ_SYSTEM_NSPR)
AC_SUBST(MOZ_SYSTEM_NSS)
-HOST_CMFLAGS=-fobjc-exceptions
-HOST_CMMFLAGS=-fobjc-exceptions
-OS_COMPILE_CMFLAGS=-fobjc-exceptions
-OS_COMPILE_CMMFLAGS=-fobjc-exceptions
+HOST_CMFLAGS="-x objective-c -fobjc-exceptions"
+HOST_CMMFLAGS="-x objective-c++ -fobjc-exceptions"
+OS_COMPILE_CMFLAGS="-x objective-c -fobjc-exceptions"
+OS_COMPILE_CMMFLAGS="-x objective-c++ -fobjc-exceptions"
if test "$MOZ_WIDGET_TOOLKIT" = uikit; then
OS_COMPILE_CMFLAGS="$OS_COMPILE_CMFLAGS -fobjc-abi-version=2 -fobjc-legacy-dispatch"
OS_COMPILE_CMMFLAGS="$OS_COMPILE_CMMFLAGS -fobjc-abi-version=2 -fobjc-legacy-dispatch"
fi
AC_SUBST(HOST_CMFLAGS)
AC_SUBST(HOST_CMMFLAGS)
AC_SUBST(OS_COMPILE_CMFLAGS)
AC_SUBST(OS_COMPILE_CMMFLAGS)