You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by da...@apache.org on 2020/07/17 17:04:48 UTC
[openoffice] branch scons-build updated: Fixes for static libraries,
C sources.
This is an automated email from the ASF dual-hosted git repository.
damjan pushed a commit to branch scons-build
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/scons-build by this push:
new 4f12a5a Fixes for static libraries, C sources.
4f12a5a is described below
commit 4f12a5aeb205f8dcd3836e2bcb58082f519c830b
Author: Damjan Jovanovic <da...@apache.org>
AuthorDate: Tue Jul 14 04:08:39 2020 +0200
Fixes for static libraries, C sources.
Patch by: me
---
main/site_scons/platform/aooplatform.py | 2 +-
main/site_scons/platform/freebsd.py | 2 +-
main/site_scons/platform/windows.py | 2 +-
main/site_scons/sharedObjects.py | 9 +++++++++
main/site_scons/site_init.py | 1 +
main/site_scons/staticLibrary.py | 2 +-
6 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/main/site_scons/platform/aooplatform.py b/main/site_scons/platform/aooplatform.py
index 1c6ea5c..55a3b84 100644
--- a/main/site_scons/platform/aooplatform.py
+++ b/main/site_scons/platform/aooplatform.py
@@ -87,7 +87,7 @@ class Platform(ABC):
pass
@abstractmethod
- def getStaticLibraryLDFlags(self, debugging, debugLevel):
+ def getStaticLibraryLDFlags(self, soenv, debugging, debugLevel):
pass
@abstractmethod
diff --git a/main/site_scons/platform/freebsd.py b/main/site_scons/platform/freebsd.py
index e5e3668..5b01470 100644
--- a/main/site_scons/platform/freebsd.py
+++ b/main/site_scons/platform/freebsd.py
@@ -239,7 +239,7 @@ class FreeBSD(aooplatform.Platform):
]
return flags
- def getStaticLibraryLDFlags(self, debugging, debugLevel):
+ def getStaticLibraryLDFlags(self, soenv, debugging, debugLevel):
return self.getLDFlags(soenv, debugging, debugLevel)
def getStandardLibs(self):
diff --git a/main/site_scons/platform/windows.py b/main/site_scons/platform/windows.py
index 0a51d29..005fbbb 100644
--- a/main/site_scons/platform/windows.py
+++ b/main/site_scons/platform/windows.py
@@ -272,7 +272,7 @@ class Windows(aooplatform.Platform):
flags += ['-SAFESEH']
return flags
- def getStaticLibraryLDFlags(self, debugging, debugLevel):
+ def getStaticLibraryLDFlags(self, soenv, debugging, debugLevel):
flags = self.getLDFlags(soenv, debugging, debugLevel)
flags += ['-LIB']
return flags
diff --git a/main/site_scons/sharedObjects.py b/main/site_scons/sharedObjects.py
index 45d435c..0fd2811 100644
--- a/main/site_scons/sharedObjects.py
+++ b/main/site_scons/sharedObjects.py
@@ -45,6 +45,15 @@ class AOOSharedObjects:
for name in names:
self.env.Append(CPPPATH='${OUTDIR}/inc/' + name)
+ def AddCSources(self, names):
+ for name in names:
+ self.objects.append(
+ self.env.SharedObject(
+ name,
+ CFLAGS = self.env['CFLAGS']
+ )
+ )
+
def AddCxxExceptionSources(self, names):
self.AddCxxSources(names,
platform.getExceptionFlags(soenv, True)
diff --git a/main/site_scons/site_init.py b/main/site_scons/site_init.py
index 765ec64..7f554bf 100644
--- a/main/site_scons/site_init.py
+++ b/main/site_scons/site_init.py
@@ -62,6 +62,7 @@ else:
###########################
from sharedLibrary import AOOSharedLibrary
+from staticLibrary import AOOStaticLibrary
from sharedObjects import AOOSharedObjects
from Ant import *
from AllLangRes import *
diff --git a/main/site_scons/staticLibrary.py b/main/site_scons/staticLibrary.py
index 40cc4bb..fd4ed06 100644
--- a/main/site_scons/staticLibrary.py
+++ b/main/site_scons/staticLibrary.py
@@ -30,7 +30,7 @@ class AOOStaticLibrary:
target,
source = sharedObjects.objects
)
- self.env['AOO_THIS'] = self.sharedLib[0]
+ self.env['AOO_THIS'] = self.staticLib[0]
self.env.Append(LINKFLAGS=platform.getStaticLibraryLDFlags(soenv, DEBUGGING, DEBUGLEVEL))
self.env.Append(LIBPATH=platform.getLDPATH(soenv))
self.env['AOO_GROUP'] = group