Kaydet (Commit) 13b73d94 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Pass also Xcode's ARCHS, OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS in lo.xcconfig

ARCHS tells Xcode to build the architecture for which the LO code has
been built. The CFLAGS properties make sure the same -D flags are used
as for the LO code.

Change-Id: I3c8af0ff9fba7d0b4eddbc0af9aad44fb385314c
üst fa66ae3a
......@@ -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])
......
......@@ -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
......
......@@ -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 =
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment