Эх сурвалжийг харах

Ensure the conformance build of objc code is using the Mac OS X SDK and

Thomas Van Lenten 9 жил өмнө
parent
commit
69d713fc3c

+ 5 - 1
conformance/Makefile.am

@@ -38,7 +38,11 @@ bin_PROGRAMS += conformance-objc
 
 
 conformance_objc_SOURCES = conformance_objc.m ../objectivec/GPBProtocolBuffers.m
 conformance_objc_SOURCES = conformance_objc.m ../objectivec/GPBProtocolBuffers.m
 nodist_conformance_objc_SOURCES = Conformance.pbobjc.m
 nodist_conformance_objc_SOURCES = Conformance.pbobjc.m
-conformance_objc_CPPFLAGS = -I$(top_srcdir)/objectivec
+# On travis, the build fails without the isysroot because whatever system
+# headers are being found don't include generics support for
+# NSArray/NSDictionary, the only guess is their image at one time had an odd
+# setup for Xcode and old frameworks are being found.
+conformance_objc_CPPFLAGS = -I$(top_srcdir)/objectivec -isysroot `xcrun --sdk macosx --show-sdk-path`
 conformance_objc_LDFLAGS = -framework Foundation
 conformance_objc_LDFLAGS = -framework Foundation
 # Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check"
 # Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check"
 # so a direct "make test_objc" could fail if parallel enough.
 # so a direct "make test_objc" could fail if parallel enough.

+ 3 - 1
objectivec/DevTools/full_mac_build.sh

@@ -136,7 +136,9 @@ fi
 if [[ "${DO_AUTOGEN}" == "yes" ]] ; then
 if [[ "${DO_AUTOGEN}" == "yes" ]] ; then
   header "Running autogen & configure"
   header "Running autogen & configure"
   ./autogen.sh
   ./autogen.sh
-  ./configure CXXFLAGS="-mmacosx-version-min=10.9 -Wnon-virtual-dtor -Woverloaded-virtual -Wunused-const-variable -Wunused-function"
+  ./configure \
+    CPPFLAGS="-mmacosx-version-min=10.9 -Wunused-const-variable -Wunused-function" \
+    CXXFLAGS="-Wnon-virtual-dtor -Woverloaded-virtual"
 fi
 fi
 
 
 if [[ "${DO_CLEAN}" == "yes" ]] ; then
 if [[ "${DO_CLEAN}" == "yes" ]] ; then