[Libreoffice-commits] core.git: 2 commits - basic/Library_sb.mk ios/CustomTarget_iOS_prelink.mk ios/LibreOfficeLight ios/source

jan Iversen jani at libreoffice.org
Sun Nov 26 18:20:46 UTC 2017


 basic/Library_sb.mk                                             |    5 +-
 ios/CustomTarget_iOS_prelink.mk                                 |   19 ++++------
 ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj |   19 +++++++---
 ios/source/LibreOfficeKit.c                                     |    6 +++
 4 files changed, 30 insertions(+), 19 deletions(-)

New commits:
commit 1512b9fd5279277e7abd3ab232c9fd38e2cbfcf7
Author: jan Iversen <jani at libreoffice.org>
Date:   Sun Nov 26 19:17:35 2017 +0100

    basic, disable scripting problem
    
    When building without scripting a couple of
    functions were undeclared, to solve that
        source/runtime/runtime
        source/classes/sbintern
    were moved so they also compile in building
    without scripting
    
    Change-Id: I908fee3caf8376d70ed286c17085d6b8a700ae75

diff --git a/basic/Library_sb.mk b/basic/Library_sb.mk
index f866a3bbd347..61424901e4e4 100644
--- a/basic/Library_sb.mk
+++ b/basic/Library_sb.mk
@@ -71,7 +71,6 @@ $(eval $(call gb_Library_add_exception_objects,sb,\
 	basic/source/classes/image \
 	basic/source/classes/propacc \
 	basic/source/classes/sb \
-	basic/source/classes/sbintern \
 	basic/source/classes/sbunoobj \
 	basic/source/classes/sbxmod \
 	basic/source/comp/basiccharclass \
@@ -97,17 +96,17 @@ $(eval $(call gb_Library_add_exception_objects,sb,\
 	basic/source/runtime/inputbox \
 	basic/source/runtime/iosys \
 	basic/source/runtime/props \
-	basic/source/runtime/runtime \
 	basic/source/runtime/stdobj \
 	basic/source/runtime/stdobj1 \
 ))
-
 endif
 
 $(eval $(call gb_Library_add_exception_objects,sb,\
 	basic/source/runtime/basrdll \
 	basic/source/runtime/methods \
 	basic/source/runtime/methods1 \
+	basic/source/runtime/runtime \
+	basic/source/classes/sbintern \
 	basic/source/sbx/sbxarray \
 	basic/source/sbx/sbxbool \
 	basic/source/sbx/sbxbyte \
commit 781c532068e4b51a372b149ee2b8f48a1c10e79f
Author: jan Iversen <jani at libreoffice.org>
Date:   Sun Nov 26 12:23:45 2017 +0100

    iOS, make Kit symbols external
    
    Xcode has a problem (a bug) with linkink .o files to a
    project, this is ignored on the linker line.
    
    We use visisbility=hidden as default, therefore the symbols
    to be exported need to have the attribute
    visibility=default
    
    Change-Id: I079189dbaf6c0f606028a1e582f320db97995285

diff --git a/ios/CustomTarget_iOS_prelink.mk b/ios/CustomTarget_iOS_prelink.mk
index 2588e72110ca..2670f9449b6e 100644
--- a/ios/CustomTarget_iOS_prelink.mk
+++ b/ios/CustomTarget_iOS_prelink.mk
@@ -8,11 +8,12 @@
 #- Env ------------------------------------------------------------------------
 IOSDEV = /Applications/Xcode.app/Contents/Developer/
 IOSLD = $(IOSDEV)Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
+IOSOBJ = $(WORKDIR)/ios/Kit.o
 
 ifeq ($(ENABLE_DEBUG),TRUE)
-IOSKIT = $(SRCDIR)/ios/generated/LibreOfficeKit_$(CPUNAME)_debug.o
+IOSKIT = $(SRCDIR)/ios/generated/libKit_$(CPUNAME)_debug.a
 else
-IOSKIT = $(SRCDIR)/ios/generated/LibreOfficeKit_$(CPUNAME).o
+IOSKIT = $(SRCDIR)/ios/generated/libKit_$(CPUNAME).a
 endif
 
 
@@ -32,15 +33,11 @@ $(IOSKIT): $(call gb_StaticLibrary_get_target,iOS_kitBridge) FORCE
 	$(IOSLD) -r -ios_version_min 11.1 \
 	    -syslibroot $(MACOSX_SDK_PATH) \
 	    -arch `echo $(CPUNAME) |  tr '[:upper:]' '[:lower:]'` \
-	    -o $(IOSKIT) \
-	    $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o  \
-	    `$(SRCDIR)/bin/lo-all-static-libs`
-
-
-
-# prelink parms: -ios_version_min 11.0 -lz -liconv -g -Wl
-#	    -e "s'@SYMROOT@'$(WORKDIR)/ios/build'g" \
-#	        -sdk $(IOS_SDK) \
+	    -o $(IOSOBJ) \
+	    $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o \
+	    `$(SRCDIR)/bin/lo-all-static-libs` \
+	    $(call gb_StaticLibrary_get_target,iOS_kitBridge)
+	$(AR) -r $(IOSKIT) $(IOSOBJ)
 
 
 
diff --git a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj
index becd7212d156..2b9d95f4eb48 100644
--- a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj
+++ b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj
@@ -16,7 +16,7 @@
 		393975781F8BECB0002DC80B /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 393975771F8BECB0002DC80B /* libiconv.tbd */; };
 		3939757A1F8BECC1002DC80B /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 393975791F8BECC1002DC80B /* libz.tbd */; };
 		39503A751F94D44900F19C78 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 39503A741F94D44900F19C78 /* libc++.tbd */; };
-		396C83371FC989AB008E662A /* dummyLOkit.c in Sources */ = {isa = PBXBuildFile; fileRef = 39284DB01FA5E150006F43E4 /* dummyLOkit.c */; };
+		396C833F1FC9D89E008E662A /* libKit_X86_64_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 396C833E1FC9D89D008E662A /* libKit_X86_64_debug.a */; };
 		396F92F71E7AE62400A28C82 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 396F92F61E7AE62400A28C82 /* Settings.bundle */; };
 		397868D61E59A3EA007F9248 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 397868D81E59A3EA007F9248 /* LaunchScreen.xib */; };
 		397E08FE1E597BD8001374E0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 397E08FD1E597BD8001374E0 /* AppDelegate.swift */; };
@@ -47,6 +47,8 @@
 		393975791F8BECC1002DC80B /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
 		39503A6F1F94C4AC00F19C78 /* lokit-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "lokit-Bridging-Header.h"; sourceTree = "<group>"; };
 		39503A741F94D44900F19C78 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
+		396C833C1FC9D62B008E662A /* libtest.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libtest.a; path = ../generated/libtest.a; sourceTree = "<group>"; };
+		396C833E1FC9D89D008E662A /* libKit_X86_64_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libKit_X86_64_debug.a; path = ../generated/libKit_X86_64_debug.a; sourceTree = "<group>"; };
 		396F92F61E7AE62400A28C82 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
 		397275391E77D9F1006ACDCC /* LibreOfficeLight.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = LibreOfficeLight.entitlements; sourceTree = "<group>"; };
 		3975A8C91FBD70EE00A87B3A /* LibreOfficeKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LibreOfficeKit.h; path = ../../include/LibreOfficeKit/LibreOfficeKit.h; sourceTree = "<group>"; };
@@ -75,6 +77,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				396C833F1FC9D89E008E662A /* libKit_X86_64_debug.a in Frameworks */,
 				39503A751F94D44900F19C78 /* libc++.tbd in Frameworks */,
 				3939757A1F8BECC1002DC80B /* libz.tbd in Frameworks */,
 				393975781F8BECB0002DC80B /* libiconv.tbd in Frameworks */,
@@ -108,6 +111,8 @@
 		3972753A1E77D9F7006ACDCC /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
+				396C833E1FC9D89D008E662A /* libKit_X86_64_debug.a */,
+				396C833C1FC9D62B008E662A /* libtest.a */,
 				39503A741F94D44900F19C78 /* libc++.tbd */,
 				393975791F8BECC1002DC80B /* libz.tbd */,
 				393975771F8BECB0002DC80B /* libiconv.tbd */,
@@ -268,7 +273,6 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				396C83371FC989AB008E662A /* dummyLOkit.c in Sources */,
 				392ED9B31E5E4B03005C8435 /* ViewPrintManager.swift in Sources */,
 				399648471E5B87DC00E73E83 /* ViewProperties.swift in Sources */,
 				39284DB31FA5F207006F43E4 /* DocumentActions.swift in Sources */,
@@ -353,10 +357,11 @@
 				HEADER_SEARCH_PATHS = "$(inherited)";
 				IPHONEOS_DEPLOYMENT_TARGET = 11.1;
 				LD_MAP_FILE_PATH = "";
+				LIBRARY_SEARCH_PATHS = /Users/jani/LO/core/ios/generated/;
 				MACH_O_TYPE = mh_execute;
 				MTL_ENABLE_DEBUG_INFO = YES;
 				ONLY_ACTIVE_ARCH = YES;
-				OTHER_LDFLAGS = "../generated/LibreOfficeKit_ARM64.o\t\t";
+				OTHER_LDFLAGS = libKit_ARM64_debug.a;
 				SDKROOT = iphoneos;
 				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
 				SWIFT_OBJC_BRIDGING_HEADER = "lokit-Bridging-Header.h";
@@ -415,10 +420,11 @@
 				HEADER_SEARCH_PATHS = "$(inherited)";
 				IPHONEOS_DEPLOYMENT_TARGET = 11.1;
 				LD_MAP_FILE_PATH = "";
+				LIBRARY_SEARCH_PATHS = /Users/jani/LO/core/ios/generated/;
 				MACH_O_TYPE = mh_execute;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				ONLY_ACTIVE_ARCH = YES;
-				OTHER_LDFLAGS = ../generated/LibreOfficeKit_ARM64.o;
+				OTHER_LDFLAGS = libKit_ARM64.a;
 				SDKROOT = iphoneos;
 				SWIFT_OBJC_BRIDGING_HEADER = "lokit-Bridging-Header.h";
 				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
@@ -541,10 +547,13 @@
 				HEADER_SEARCH_PATHS = "$(inherited)";
 				IPHONEOS_DEPLOYMENT_TARGET = 11.1;
 				LD_MAP_FILE_PATH = "";
+				LIBRARY_SEARCH_PATHS = /Users/jani/LO/core/ios/generated/;
 				MACH_O_TYPE = mh_execute;
 				MTL_ENABLE_DEBUG_INFO = YES;
 				ONLY_ACTIVE_ARCH = YES;
-				OTHER_LDFLAGS = ../generated/LibreOfficeKit_ARM64_debug.o;
+				OTHER_LDFLAGS = libKit_X86_64_debug.a;
+				OTHER_LIBTOOLFLAGS = "";
+				"OTHER_LIBTOOLFLAGS[arch=*]" = "";
 				SDKROOT = iphoneos;
 				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
 				SWIFT_OBJC_BRIDGING_HEADER = "lokit-Bridging-Header.h";
diff --git a/ios/source/LibreOfficeKit.c b/ios/source/LibreOfficeKit.c
index 6240f802cf4d..cdd1c09a8ed5 100644
--- a/ios/source/LibreOfficeKit.c
+++ b/ios/source/LibreOfficeKit.c
@@ -35,6 +35,7 @@ static double twipsPerXtile, twipsPerYtile;
 
 
 // Bridge functions to LibreOfficeKit
+__attribute__((visibility("default")))
 int BridgeLOkit_Init(const char *path)
 {
     char bufUserPath[200];
@@ -52,6 +53,7 @@ int BridgeLOkit_Init(const char *path)
 
 
 
+__attribute__((visibility("default")))
 int BridgeLOkit_Sizing(const int countXtiles, const int countYtiles,
                        const int pixelsXtile, const int pixelsYtile)
 {
@@ -79,6 +81,7 @@ int BridgeLOkit_Sizing(const int countXtiles, const int countYtiles,
 
 
 
+__attribute__((visibility("default")))
 int BridgeLOkit_open(const char *path)
 {
     document = kit->pClass->documentLoad(kit, path);
@@ -88,6 +91,7 @@ int BridgeLOkit_open(const char *path)
 
 
 
+__attribute__((visibility("default")))
 int BridgeLOkit_ClientCommand(const char *input)
 {
     (void)input;
@@ -96,6 +100,7 @@ int BridgeLOkit_ClientCommand(const char *input)
 
 
 
+__attribute__((visibility("default")))
 int BridgeLOkit_Hipernate()
 {
     //FIXME
@@ -106,6 +111,7 @@ int BridgeLOkit_Hipernate()
 
 
 
+__attribute__((visibility("default")))
 int BridgeLOkit_LeaveHipernate()
 {
     //FIXME


More information about the Libreoffice-commits mailing list