summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac13
-rw-r--r--ios/CustomTarget_Lo_Xcconfig.mk12
-rw-r--r--ios/lo.xcconfig.in12
3 files changed, 23 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 0c58a9cf81be..ab86c34d17c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2973,10 +2973,10 @@ if test $_os = iOS; then
if test "$enable_ios_simulator" = yes; then
if test "$BITNESS_OVERRIDE" = 64; then
- arch=x86_64
+ XCODE_ARCHS=x86_64
versionmin=-mios-simulator-version-min=7.0
else
- arch=i386
+ XCODE_ARCHS=i386
case $sdkver in
7.*)
versionmin=-mios-simulator-version-min=6.1
@@ -2989,10 +2989,10 @@ if test $_os = iOS; then
else
platform=iPhoneOS
if test "$BITNESS_OVERRIDE" = 64; then
- arch=arm64
+ XCODE_ARCHS=arm64
versionmin=-miphoneos-version-min=7.0
else
- arch=armv7
+ XCODE_ARCHS=armv7
versionmin=-miphoneos-version-min=6.1
fi
fi
@@ -3023,8 +3023,8 @@ if test $_os = iOS; then
stdlib="-stdlib=$XCODE_CLANG_CXX_LIBRARY"
- CC="`xcrun -find clang` -arch $arch -fvisibility=hidden -isysroot $sysroot $lto $versionmin"
- CXX="`xcrun -find clang++` -arch $arch -fvisibility=hidden $stdlib -isysroot $sysroot $lto $versionmin"
+ CC="`xcrun -find clang` -arch $XCODE_ARCHS -fvisibility=hidden -isysroot $sysroot $lto $versionmin"
+ CXX="`xcrun -find clang++` -arch $XCODE_ARCHS -fvisibility=hidden $stdlib -isysroot $sysroot $lto $versionmin"
INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
AR=`xcrun -find ar`
@@ -3035,6 +3035,7 @@ if test $_os = iOS; then
fi
AC_SUBST(XCODE_CLANG_CXX_LIBRARY)
+AC_SUBST(XCODE_ARCHS)
AC_MSG_CHECKING([whether to treat the installation as read-only])
diff --git a/ios/CustomTarget_Lo_Xcconfig.mk b/ios/CustomTarget_Lo_Xcconfig.mk
index b6032dacc8a3..31a697342edd 100644
--- a/ios/CustomTarget_Lo_Xcconfig.mk
+++ b/ios/CustomTarget_Lo_Xcconfig.mk
@@ -15,10 +15,16 @@ $(call gb_CustomTarget_get_target,ios/Lo_Xcconfig): $(LO_XCCONFIG)
.PHONY : $(LO_XCCONFIG)
$(LO_XCCONFIG) :
- # Edit in the list of all our (static) libs in the Xcode
- # configuration file.
+ # Edit the Xcode configuration file:
+ # - the list of all our (static) libs
+ # - compiler flags
+ #
all_libs=`$(SRCDIR)/bin/lo-all-static-libs`; \
- sed -e "s|^\(LINK_LDFLAGS =\).*$$|\1 $$all_libs|" < $(LO_XCCONFIG) > $(LO_XCCONFIG).new && mv $(LO_XCCONFIG).new $(LO_XCCONFIG)
+ \
+ sed -e "s,^\(LINK_LDFLAGS =\).*$$,\1 $$all_libs," \
+ -e "s,^\(OTHER_CFLAGS =\).*$$,\1 $(gb_GLOBALDEFS)," \
+ -e "s,^\(OTHER_CPLUSPLUSFLAGS =\).*$$,\1 $(gb_GLOBALDEFS)," \
+ < $(LO_XCCONFIG) > $(LO_XCCONFIG).new && mv $(LO_XCCONFIG).new $(LO_XCCONFIG)
# When SRCDIR!=BUILDDIR, Xcode is used on the project in the
# *source* tree (because that is where the source files are). Copy
diff --git a/ios/lo.xcconfig.in b/ios/lo.xcconfig.in
index c63e13cb4303..3f654ed76041 100644
--- a/ios/lo.xcconfig.in
+++ b/ios/lo.xcconfig.in
@@ -6,7 +6,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-// Xcode configuration variables
+// Xcode configuration properties
// To avoid confusion, the LO-specific ones that aren't as such used
// by Xcode (but only expanded in option values) are prefixed with
@@ -17,11 +17,13 @@ LO_INSTDIR = @INSTDIR@
LO_SRCDIR = @SRC_ROOT@
LO_WORKDIR = @WORKDIR@
-// The value of this variable is inserted in
-// CustomTarget_MobileLibreOffice_app.mk.
-LINK_LDFLAGS =
-
// These are actual Xcode-known settings. The corresponding autoconf
// variables are prefixed with XCODE_ to make it clear in configure.ac
// what they will be used for.
+ARCHS = @XCODE_ARCHS@
CLANG_CXX_LIBRARY = @XCODE_CLANG_CXX_LIBRARY@
+
+// These settings are edited in CustomTarget_Lo_Xcconfig.mk.
+LINK_LDFLAGS =
+OTHER_CFLAGS =
+OTHER_CPLUSPLUSFLAGS =