Bug 1420165 - Enforce objective-c/c++ language type when compiling .m/mm files. r?Build draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 24 Nov 2017 12:36:04 +0100
changeset 703155 e2afe328a0e6ea79fb92828fccaade20c425dfe7
parent 702247 960f50c2e0a991ab2ab313132e69fb2c96cb7866
child 741684 8bf1908ed49df26a7a0b23b3ee6606bc04cf91e8
push id90726
push userbmo:jyavenard@mozilla.com
push dateFri, 24 Nov 2017 11:45:23 +0000
reviewersBuild
bugs1420165
milestone59.0a1
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
old-configure.in
--- 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)