summaryrefslogtreecommitdiff
path: root/solenv
AgeCommit message (Collapse)Author
2022-01-08sp2bv is just used by the ODK on WindowsJan-Marek Glogowski
And I should have tested gb_Helper_optionals_and. Inspecting the generated token for comparison doesn't result in gb_[T1]_[T2], as I expected. So first filter the token from BUILD_TYPE, then filter-out the result from the input token. If true, then both sets are equal == and. Change-Id: I74a324f766331b30a0af9c9bfd7c927c1d21df53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128115 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-07Don't build a static unopkgJan-Marek Glogowski
Currently we don't destinguish between between extensions without code, which couldn't be executed with DISABLE_DYNLOADING, and all other extensions, like translations, dictionaries, etc., so there is no need for a static unopkg. Change-Id: I427a51b3174d074e467a582e808490a85e98e8eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128114 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-07VCL move platform code from mouse.cxx into pluginsJan-Marek Glogowski
... by moving it into ImplCreate(DragSource|DropTarget). The existing Create* variant now checks for headless mode and the IsRunningUnitTest flag, before creating the platform variants. There are two small helpers to initialize either X11 or Ole based UNO DnD interace implementations. Unfortunatly Windows requires to move two dtrans header files, but at least any other changes are minimal. Change-Id: Id79459ad71a26243b1c9cb1fe38ab236b0ab8fa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128049 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-07gbuild: fix actually used libraries for mergelibJan-Marek Glogowski
Just the $(filter $(gb_MERGEDLIBS),$(2)) in the "if" was wrong, but reformat and add a comment to make the code easier to read. This way we correctly header-depend on all requested libraries, but just export-depend on the real libraries. And actually use gb_LinkTarget__is_build_lib in the ifeq, as otherwise the build now fails for the reduced dependencies. Change-Id: I24d5701891324f5055c9dfa535bd854d09fbb905 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127994 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-06annocheck warning about missing .note.gnu.property sectionCaolán McNamara
copy and paste recommendation from: https://sourceware.org/annobin/annobin.html/Test-cf-protection.html and adapt like: https://github.com/openssl/openssl/commit/51994e505dbb1cd0dd76869ec962e2948b77b585 where https://bugs.ruby-lang.org/attachments/8962 is similar Intel docs have "The ENDBR32 and ENDBR64 (collectively ENDBRANCH) are two new instructions that are used to mark valid indirect CALL/JMP target locations in the program." Change-Id: Ie867c263a888763db4478720ba189c9ec6cc974d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126859 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-05gbuild: skip libmerged externals for partial buildsJan-Marek Glogowski
When running a full build, all externals of merged libraries are also added to libmerged when adding externals for the merged lib. Non-skipping for partial builds also breaks gbuildtojson, for all modules, which are merged and have additional libraries, tests or binaries, which then depend on the libmerged. This triggers for gbuildtojson, because the skipped %.exports now actually matter when checking the libmerged state. make then tries to rebuild it, but this can never work for a partial build, even with the full gbuild ruleset, not stripped by solenv/gbuild/extensions/post_GbuildToJson.mk. The totally confusing result, due to the mangled ruleset, is that the first externals %.exports overwrites libmerged in instdir. Change-Id: I2b72a8b543dbbd8c8f573bfe963164329bdd73e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127995 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-01Further separate saxparser run from cmp'n'touchJan-Marek Glogowski
At least on Windows the calls to saxparser almost feel as slow as the compilation. So this adds an intermediate file just for the cmp calls, costing just a bit more filesystem space. This also reverts the gb_MKTEMP usage introduced in commit 14eeed686c5490ddbd356c1ac807b16231e4cb88. Using a fixed name in WORKDIR is easier to debug eventually, then some random mktemp generated file, and is faster anyway. Change-Id: Id4979b75b881e916c209ff0ff8e123536294e93b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127841 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-01fix solenv/gbuild/extensions/post_Fuzzers.mk:11: *** missing separatorCaolán McNamara
since... commit c859b4aa48956cbf5ff41280b0008456e8f5189c Date: Fri Dec 31 09:11:10 2021 +0100 gbuild: introduce gb_%_linktarget_target Just some refactoring. I also think gb_Executable_linktarget_target should be gb_Executable_get_linktarget_target. Change-Id: I270fe10ca7d12c454ce69744815a2e35a909a851 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127819 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-01gbuild: silence Windows Skia clang buildsJan-Marek Glogowski
When building Skia on Windows in an non-English environment, the console is filled with "Note: including file:" output. That's because cl.exe has some translated output, but clang.exe has not. So detect the clang usage and its "showIncludes" output and override that setting for the compiler call. Change-Id: I19b403aa79a8dde70616865aef051aa365f79de6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127822 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-01oss-fuzz: depend on linktarget, not the binaryJan-Marek Glogowski
Not really an oss-fuzz-only problem, but general linking of static binaries. Broken in commit ecc50f56b3282ec3b0364101d860f22fe8da9042 ("gbuild: set library dependency for static builds"). Change-Id: Iba9c9405cf4adb78c1ec9b64dfa02c3a82d2cf55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127800 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-31gbuild: introduce gb_%_linktarget_targetJan-Marek Glogowski
Just some refactoring. Change-Id: I47adb93f8a413d289f6abb2a48ed3f049f582a46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127799 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-30oss-fuzz: chain-depend all *fuzzer binariesJan-Marek Glogowski
Change-Id: Id92ae26db0c4321f1670f7bd6d8c03c521e18d93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127712 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-28gbuild: announce date when acquiring the link lockJan-Marek Glogowski
Must use echo, because we're in the shell at this point. Change-Id: I576ae2afe743b11a11bc776e5fa19a1904bbd1fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127610 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-25oss-fuzz: fix some compiler warningsJan-Marek Glogowski
Some unused functions and variables and many missing HAVE_FEATURE_NSS warnings, because the native-code.py stubs were missing the config_crypto.h header. Change-Id: I88ff7d8f96e7382027a21f205db982fd797bd6af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127392 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-24gbuild: set library dependency for static buildsJan-Marek Glogowski
For DISABLE_DYNLOADING builds, all libraries become real and not export-only dependencies. And all real linking targets need a dependency on all static libraries. Change-Id: I8433a0225d428951739f7afa3068a61dce9e61eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127236 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-24Enforce cross-compilation for static buildsJan-Marek Glogowski
... AKA DISABLE_DYNLOADING, except for oss-fuzz, which will be converted to a cross build in a follow-up patch. This includes skipping the static registry and help tooling and aborts configure when the ODK is selected to be build. Change-Id: Ifae32e91acf5e9ffa234d8f915ee459b197091fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127287 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-23add drawinglayercore to merged libsTomaž Vajngerl
Change-Id: I3c2fc7f72fab8eb5deb21c609bd60663ba35e251
2021-12-22janitorial: the lang definitions aren't really an optional part of gbuildChristian Lohmaier
furthermore there's no need to keep them separate to fit dmake anymore, so lump together what goes together... Change-Id: Ic0377a322100c20352e211e53a670a9b0b227ab4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127332 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-12-21Run `make check` in flatpak buildStephan Bergmann
Back when solenv/flatpak-manifest.in started with 68fda058972a6fbb38b797f50575b84f4cb3fab1 "Put flatpak-builder manifest file into core repo", the default `make` target ran various unit- and slowchecks (so that was what Flatpak builds did back then), until a58e086ededb8442938e81f971dfae36ef7eb076 "rework the default make target" changed the default `make` target to not run any checks at all (so that is what Flatpak builds did since then). Also, for one, 9cf2616c5e709b595eeee6ab88dacdfad2003f98 "Work around i386 kernel vs. JVM bug for now by disabling all tests on i386" had made i386 not run any tests at all (back when the default `make` target still ran various unit- and slowchecks; and which was later cleaned up with 243c05ac27e3ffd94343630e668a53cf3ad18744 "Retire build-nocheck" when there was no longer a need to explicitly mention build-nocheck to not run any checks at all). But at least on Flathub we no longer do i386 builds anyway, so this is presumably moot today. And for another, 6cb20e0b298f41fe88984aebfe5454f936a0ae3a "Disable CppunitTset_sc_*_functions_test for linux_aarch64 for now, too" had disabled certain "tests for aarch64 for now too, to get Flathub builds unstuck" (back when the default `make` target still ran various unit- and slowchecks). But that has since been fixed (and 6cb20e0b298f41fe88984aebfe5454f936a0ae3a been reverted with ae6f41424608b349b45eb3f18ee8c7cff5d6c182 "Revert 'Disable CppunitTset_sc_*_functions_test for linux_aarch64 for now, too'"), with commits culminating in 57ad86fec9e5b4981332392bdb5c5a1f5e468bfe "Allow for some variance in results of some more Calc function calls". A recent master test build with `make check` on Flathub succeeded at <https://flathub.org/builds/#/builders/32/builds/71637> (for the two architectures aarch64 and x86_64 that we build on Flathub), so lets enable that for now and see how that works out in practice. If it proves too brittle with too many spurious check failures, we can either restrict it to running fewer checks (e.g., the old unit- and slowcheck behavior), or disable it completely again. Change-Id: I62efc41669ff634551fc07f24069f296f3d0d0bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127201 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-21Disallow multiple component files per libraryJan-Marek Glogowski
This converts existing users of multiple component files to the new filtering mechanism and adds a check to error in the case that someone tries to set multiple component files again. Change-Id: Ie75d6c5d1b78f446ff06faba7350715289b8d17e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-21Filter optional component implementations by nameJan-Marek Glogowski
Instead of trying to make up BUILD_TYPE items to match complex build conditions and then patch the component file with it, filter the component files based on the unique implementation name and an <optional/> tag. Currently these optional implementations are grouped in external files with an identifier. Originally the optional implementations were automatically iden- tified by adding them to any external file, but this behavior is too easy to get wrong. Even better: if need arrises, one can now easily implement a feature to add implementation names directly using gbuild calls, instead of grouped files. The basic mechanism is to collect all optional implementations, remove the needed ones from that list and then filter-out all implementations not needed (AKA the rest of the list). It's no problem to have the same optional implementations selected in multiple files. This is especially used by the vcl.common component in a later patch. For gbuild this adds gb_Library_add_componentimpl. The component parameter for the call is explicitly omitted, so you must call gb_Library_set_componentfile before selecting any optional implementations. The strict naming is also enforced by appending the identifier to the component file name. This replaces commit 65c0887bca2909b2046eb5aa4aaace0cc320c3f2 ("Allow for conditional parts of component files"). Change-Id: I0261cadce8bdfebb6b3ec96669ec378a5c1d9699 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126891 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2021-12-18Drop ComSmart and use sal::systools::COMReferenceMike Kaganski
Change-Id: Ib4f5d160b66c01caa507f536fb487bc5ee527815 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127045 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-18Implement building ComponentTarget directlyJan-Marek Glogowski
I have no idea, why this was omitted; probably just an oversight. While a path as the target specifier looks strange to me, e.g. ids like ComponentTarget_svx/util/svx, they work as expected. Change-Id: I6dd4d382dddb8ad67cdd397db3b1c985c14cd948 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127023 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-16NEON_{SHA256SUM,TARBALL} are gone from download.lstStephan Bergmann
...since 023ebf17898db4bca63129f079fd90b5cf76c1a9 "ucb: remove --with-webdav=neon" Change-Id: I6744cc853d5c12bf29751bb6c1815d5de507d0fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126961 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-16Refactor Library_sal_textenc build conditionJan-Marek Glogowski
... by adding and using gb_CondSalTextEncodingLibrary. Change-Id: I04e8f56bde6296477d449f1c447e8133cdf86e6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126788 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-15lockfile: use a single build conditionJan-Marek Glogowski
... and introduce solenv/gbuild/Conditions.mk The Conditions.mk is included just after the Helpers.mk, which should make its content available basically everywhere. Change-Id: Ie4498e12b3d0f676ed0c9abf4b3bb4899d6a1c03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126787 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-15ucb: remove --with-webdav=neonMichael Stahl
Remove code in ucb/source/ucp/webdav-neon, and now unused external neon. The --with-webdav=no option is retained for now. Change-Id: I4ce429587e3991fa82009da2f8e4a068abe36435 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126839 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-12-15ucb: remove --with-webdav=serfMichael Stahl
Remove code in ucb/source/ucp/webdav, and now unused externals apr, apr-util, serf. Change-Id: I31ab8bb1491f5290e175e87f2b30499811c5a359 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126835 Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-12-14Allow for conditional parts of component filesStephan Bergmann
1c9a40299d328c78c035ca63ccdf22c5c669a03b "gbuild: create services.rdb from built components" had moved parts of svx/util/svx.component and sw/util/sw.component into additional, conditionally included component files (and which this commit moves back into the original component files). But that lead to multiple <component> elements for a single library in service rdb files, which was unfortunate for several reasons: For one, while the code in cppuhelper/source/servicemanager.cxx happened to support that, it was not guaranteed to support it, so this relied on an implementation detail of that code. And for another, for that to work, all the component files for a library had to provide identical environment, loader, and prefix (if any) attributes, but which was not verified and thus was brittle. Instead, introduce a CONDITION attribute for the <implementation> elements in the source component files, which decides whether or not such <implementation> elements are passed through (after dropping the CONDITION attribute) into the processed component files (in workdir/ComponentTarget/). (The attribute is spelled all-uppercase to make it more obvious that it is special syntax that is not simply passed through to the output component file.) For now, such a CONDITION attribute must have a value that matches BUILD_TYPE:x for some feature x in $(BUILD_TYPE), but the syntax can be extended if the need arises. (gb_Library_set_componentfiles is thus no longer needed and has been removed again.) Change-Id: I360cf4cc0f3a2a738113d430891500715a8fe3a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126560 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-14Revert "add stagingcheck target for unstable/failing tests"Stephan Bergmann
This reverts commit c1f47481eb78df3d73bed1da5020ed6ea565a999. Conflicts: solenv/gbuild/Module.mk solenv/gbuild/gbuild.help.txt It has apparently never been used. Change-Id: I18a47d740c0a78ae295a60257207ecce66f38a8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126741 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-13gbuild: forward / set linktargetmakefilenameJan-Marek Glogowski
Unfortunatly RepositoryExternal.mk ais generally not forwarding this info. It's also not really documented. Change-Id: I7920f7442521ab06f18c16397a13615e4517d053 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126730 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-13Refactor some buildsytem stuff (mostly whitespace)Jan-Marek Glogowski
Change-Id: Idfca786ecc7251e08525bd5b45936143727c43d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126731 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-13Drop desktop_detector from mergelibsJan-Marek Glogowski
Jenkins lo_callgrind_linux job failed with: .../vcl/Library_desktop_detector.mk:22: \ *** Plugins can't be in mergelibs. Stop. Regression from commit b2882faf43ea1fa473621d0378c5d87ae3b3d5a2 ("desktop_detector is also a vcl plugin"). Change-Id: Idc6d867e38d68006b6e1d8a44746085f36ebc5d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126738 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-13Use default gb_COMPILEROPTFLAGS -O2 for LINUX_AARCH64_GCCStephan Bergmann
235fa0334e0b45c736b636ba1689e2f8c7458697 "Linux AArch64 port" had presumably cargo-culted the -Os value (under the name gb_COMPILERDEFAULTOPTFLAGS back then) from some other file like solenv/gbuild/platform/LINUX_ARM_GCC.mk, but for no apparent reason. Lets rather use the -O2 default value, as on other 64-bit architectures like LINUX_X86_64_GCC. Change-Id: I21a4c69a6c4339114871be29235f60836798f256 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126725 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-12prefer css::awt::XPopupMenu apiCaolán McNamara
and using GetXGraphic will return a vcl unographic::XGraphic which also supports XBitmap as well as XGraphic so we can check if the XBitmap we're passing around supports XGraphic and use that if it does and drop the imagewrapper in favor of doing that Change-Id: I3bd7963b53c3f715fca4b5cfb2ddad650ca92e1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126691 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-10Generally determine Rdb content from gb_*_set_componentfile callsStephan Bergmann
...instead of by listing the content somewhat redundantly in the Rdb_*.mk files, to avoid duplication of logic for components that are only built conditionally (and thus should only be included conditionally in the corresponding Rdb). To achieve that, add an "rdb" parameter to gb_ComponentTarget_ComponentTarget (and to the gb_*_set_componentfile macros that internally call gb_ComponentTarget_ComponentTarget), which is used to make the appropriate gb_Rdb_add_component call internally from within gb_ComponentTarget_ComponentTarget. (As a special case, gb_CppunitTest_set_componentfile shall not call gb_Rdb_add_component, as that has already been done by the corresponding gb_Library_set_componentfile call, so allow the gb_ComponentTarget_ComponentTarget "rdb" parameter to be empty to support that special case.) Most Rdb_*.mk files are thus mostly empty now. One exception is i18npool/Rdb_saxparser.mk, which duplicates some of the Rdb_services content as needed during the build in CustomTarget_i18npool/localedata. 1c9a40299d328c78c035ca63ccdf22c5c669a03b "gbuild: create services.rdb from built components" had already tried to do something similar (in addition to other things) under a new --enable-services-rdb-from-build option. However, that approach had four drawbacks that this approach here addresses (and which thus partly reverts 1c9a40299d328c78c035ca63ccdf22c5c669a03b): 1 Rdb_services shall not contain the component files of all libraries that are built. While that commit filtered out the component files that go into Rdb_ure/services (ure/Rdb_ure.mk), it failed to filter out the component files that go into others like Rdb_postgresql-sdbc (connectivity/Rdb_postgresql-sdbc.mk). 2 The code added by that commit to Makefile.gbuild codified the knowledge that there is an Rdb_services, which is brittle. 3 The code added by that commit to solenv/gbuild/Rdb.mk codified the knowledge (for gb_Rdb__URECOMPONENTS) that there is an Rdb_ure/services, which is brittle. 4 Introducing an --enable-services-rdb-from-build option needlessly provided two different ways how the content of Rdb_services is assembled. The changes done here would leave --enable-services-rdb-from-build as a misnomer, as it no longer controls how Rdb_services is assembled. I thus renamed it to --enable-customtarget-components, as that is apparently what it still does now. Change-Id: Ia5e8df4b640146c77421fcec6daa11a9cd260265 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126577 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-06Retire build-nocheckThorsten Behrens
Build target was kept for backward compat in 'rework the default make target', so lets retire it after 1.5 years. Use 'make build' instead (which is since the default target anyway). Change-Id: I93d5237dce2abf2536a4d847d79d33d5b6d6cec9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126362 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-12-06don't want to link to system static libs for DISABLE_DYNLOADINGCaolán McNamara
since... commit 4250958a492b300a52a83e68dd599f9c36c5086e Author: Caolán McNamara <caolanm@redhat.com> Date: Fri Aug 20 14:31:36 2021 +0100 ofz: prep for allowing oss-fuzz msan dependencies need to be built with the msan flags so undo the --with-system .a usage now that trying to squeeze into the 12 hour build window isn't critical because the afl 6-8 hour build+check is disabled dropped the use case for that Change-Id: Ic525c9e0a948195cc823d904ba5a0d80b3aff668 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126455 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-06gbuild: create services.rdb from built componentsJan-Marek Glogowski
... and introduce the --enable-services-rdb-from-build option. Currently the build handles global build options redundant in a few places: * in Repository*mk + modules - the "real" build dependencies * the full services.rdb generation * the static UNO constructor map generation Also the component files don't reflect the really built components and so the RDB services generation must handle the whole options to select the correct components. So this optionally replaces the latter two by generating the list of components and it's constructors from the build itself. As a consequence, component files must now be split, so they reflect the real components in the libraries, otherwise the static constructor list will have missing symbols. IMHO this is more natural, as it happens in the same place already handling these build options for the sourcecode. This also adds a convenience helper to add multiple component files: gb_Library_set_componentfiles This is WIP and currently just works for the stripped WASM build, which introduces many more split component files in later patches. It also explicitly filters the gb_Rdb__URECOMPONENTS and the CppunitTest related components from the services.rdb. Maybe there is a good way to do this properly. Change-Id: I1b38a6f2c1e5221f18d7e5e756c30263b555d962 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126185 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-06an empty $LOCKFILE means build our ownCaolán McNamara
Change-Id: I93fd08b3b106e461f402446bd4dbbe78b8f06849 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126450 Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Tested-by: Jenkins
2021-12-06Limit static system library linking to fuzzersJan-Marek Glogowski
When building a static LO on Linux, I get a lost of missing symbols for binaries, like oosplash. In that case we just link to Xinerama, but this has obviously other X11-based dependencies, and there is no real way to fix this. According to caolan, this was just added in commit 7a3eaef6dd707781c2f4e341aebb9d4c42df780f ("for DISABLE_DYNLOADING support linking to static .a system libs") to support instrumented static libraries used for the oss-fuzz runs (see https://github.com/google/oss-fuzz/issues/608). So actually limit these flags for FUZZERS only. Change-Id: I7eaa81c46fab040848fdf4dbe100a6e634f54446 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126409 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-06concat-deps: ignore /./ segments in input pathsJan-Marek Glogowski
concat-deps detects relative path segments (AKA /../) and removes these in cancel_relative(...) to save space (by removing the preceding path segment from the output path). But that logic doesn't account for preceding /./ segments, resulting in paths to non-existing files. This then resulted in mysterious, unneeded compiling of seemingly unchanged files for my incremental cross-toolset builds. I actually assumed some error in my complex gbuild static changes, which are already driving me crazy... "make -d" showed these wrong paths, but inspecting the ".d" for the actual files (from gcc output), they were ok; took me a while to realize the problem were LO's concat-dep files for libraries. But instead of complicating cancel_relative(), this just jumps over /./ segments in the input path. cancel_relative() works on the &cursor_out copy anyway. Change-Id: I2a8ecd04fdfa790859668d690a102cfb156aa649 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126345 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-06Fix lockfile compiler warningsJan-Marek Glogowski
Now that we've patched the source for typos in commit 921c2059f9a85ab5ad26463e864e49d4e7b48d9e ("Fix typos"), also fix the compiler warnings. Change-Id: I0e1f1bfe19a475c431d2244257e245482950a843 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126380 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-05don't build lockfile if using external LOCKFILECaolán McNamara
Change-Id: I99f1f6c95f11a2d8f7b57b20965a35066bb1bbee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126381 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-04Fix typosAndrea Gelmini
Change-Id: I9f7d185d7d9ac0b90473464932103a7c5545fdc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126260 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-12-03ofz#41602 fix more build failureCaolán McNamara
[LNK] Executable/fodsfuzzer workdir/LinkTarget/StaticLibrary/libfuzzer_calc.a(native-calc.o):native-calc.cxx:lo_get_constructor_map::map: error: undefined reference to 'com_sun_star_comp_framework_SoundHandler_get_implementation' clang-14: error: linker command failed with exit code 1 (use -v to see invocation) Change-Id: Id22e52491bf95eff7b72ac1fc9e2c63f3dfb30b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126332 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-03replace comphelper::OListenerContainer with OInterfaceContainerHelper3Noel Grandin
OInterfaceContainerHelper3 is in wide use and can do the same thing with less ceremony Change-Id: I5252738d6b7bda6245c66da46352944ead79bd52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126271 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-03Fix --enable-mergelibs plugin dependencyJan-Marek Glogowski
Not sure why I didn't use gb_LinkTarget_use_libraries instead of the internal version. Regression from commit ed583bf8d553b145f83b66118253aaf7ac94fa1a ("gbuild: introduce plugin + loader concepts"). Change-Id: I600aee16c0c7296e14435c20ef4f47123db93a11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126268 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-03gdb: BigPtrArrayPrinter gets confused by libstdc++ std::unique_ptrMichael Stahl
It looks like this in libstdc++: <BigPtrArray> = { m_ppInf = { _M_t = { <std::__uniq_ptr_impl<BlockInfo*, std::default_delete<BlockInfo* []> >> = { _M_t = { <std::_Tuple_impl<0, BlockInfo**, std::default_delete<BlockInfo* []> >> = { <std::_Tuple_impl<1, std::default_delete<BlockInfo* []> >> = { <std::_Head_base<1, std::default_delete<BlockInfo* []>, true>> = { _M_head_impl = {<No data fields>} }, <No data fields>}, <std::_Head_base<0, BlockInfo**, false>> = { _M_head_impl = 0x567fd20 }, <No data fields>}, <No data fields>} }, <No data fields>} }, Note there are 2 _M_head_impl members, and somehow gdb 11.1-2.fc34 picks the wrong one. A manual cast to std::_Head_base<0, BlockInfo**, false> seems to help. Change-Id: I1332c2fc6eb2661d417fd92a73aed977bbb1dcea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126220 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-12-02Fix clang-cl -Zc:dllexportInlines- buildStephan Bergmann
That flag is only supported by clang-cl, not by MSVC, and c7c9f3f57a2feae5d3bc3c47104786883ed09e44 "use clang-cl's -Zc:dllexportInlines- for clang-cl builds" apparently naively assumed that it would work to build LO with clang-cl and that flag without actually trying it out, and 1040228c356d75c5228cde4d6103f9b446848e4b "My clang-cl build does not work with -Zc:dllexportInlines-" effectively disabled it completely. The way to avoid unresolved external symbols during linking of URE libraries (see the 1040228c356d75c5228cde4d6103f9b446848e4b commit message) is apparently to also build libraries that the URE libraries depend on with the flag, hence the change from gb_Library_set_is_ure_library to gb_Library_set_is_ure_library_or_dependency. For now, I only marked those additional libraries (unoil and xmlreader) that actually caused issues when linking the URE libraries. Change-Id: I3a85c73246250981cd86b7ee41f87b41f393a4b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126012 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins