summaryrefslogtreecommitdiff
path: root/solenv/gbuild
AgeCommit message (Collapse)Author
2023-01-17Adapt for --enable-wasm-exceptionsTor Lillqvist
Actually, it seems that to build core with --fwasm-exceptions for use in a LibreOffice Technology -using WASM executable, you need to compile *everything* with that (i.e. *all* of core's externals). Just these gbuild things are not enough to ensure that. You have to put CC=emcc -pthread -fwasm-exceptions -s SUPPORT_LONGJMP=wasm CXX=em++ -pthread -fwasm-exceptions -s SUPPORT_LONGJMP=wasm into your autogen.input. Change-Id: I10d21ad0f73e7e5d72864864d595077bd770f4f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145646 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2023-01-14EXCEPTIONS_ON has no meaningTor Lillqvist
Change-Id: I0ca0dcb76d342b451879788b57da03fb7d79e699 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145456 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-01-12introduce docmodel comp., model::ThemeColor, use it in SvxColorItemTomaž Vajngerl
Added a new component docmodel, that has the document model types, which only depend on other basic components. This is needed so the types can be used in every relevant component - xmloff, oox, svx, editeng,... Introduces model::ThemeColor, which is a class used to store the theme color data, including transformations (svx::Transformation). For UNO use XThemeColor is added, and the implementation UnoThemeColor which wraps svx::ThemeColor, so it can be tranported around. Reactor all the code and tests to accomodate for this change. Change-Id: I7ce6752cdfaf5e4d3b8e4d90314afa469dd65cfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144847 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-11Use gb_EMSCRIPTEN_QTDEFS only when building with Qt5Tor Lillqvist
Move -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE to gb_EMSCRIPTEN_CPPFLAGS. Change-Id: I435a8482e9d04d9c8218926865738397e2897109 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145354 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-01-03More verbose unoidl-check errorsStephan Bergmann
Change-Id: Ie9aa57c5fca730c7874a527cbe5a0d463a67a0e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144930 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-23Don't use symlinks for the Emscripten soffice.data and soffice.data.js.metadataTor Lillqvist
Symlinks just complicate things. Disk space is cheap. soffice.data is under 100 megs even with Qt5. Note that after this you will need to clean out the existing soffice.data and soffice.data.js.metadata symlinks before you run make, otherwise you will get errors. As such, it is a bit weird that we unconditionally play around with soffice.data for *all* (non-CppunitTest) Executable targets. (Thus, for instance also for vcldemo and unoidl-read.) We should do this dance only for the soffice executable. And we should reduce the number of executables we build for Emscripten. Probably none other than soffice itself makes sense? Change-Id: I75f6719b92d83e88bf59d65c38aeeab47e0b29e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144781 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-12-23Un-confuse Emscripten and Qt5 conditionalsTor Lillqvist
The embedded file system that we construct when building for Emscripten is not related to whether we use Qt5 or not. Change-Id: Ibf65cae06093d9130a19780c1116f8b9997c664b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144780 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2022-12-22gb_LTOFLAGS: use -flto=jobserver instead of fixed $(PARALLELISM)Christian Lohmaier
fixed PARALLELISM causes explosion of jobs, especially when machines wtih many cores/threads. A make wtih PARALLELISM=16 would launch up to 16 linker invocations that by themselves would also do their linking with a parallelism of 16, causing load of over 100 and very likely exhausting all memory bringing the system to a crawl or cause OOM kills. for a command to be able to communicate with make's jobserver, it must be part of a submake called with $(MAKE) or the command from the rule needs to be prefixed with the + character. While our gbuild stuff is a submake call, it only is that submake that uses the PARALLELISM flags determined by configure, so that is not sufficient for jobserver usage by the the lto linker. Change-Id: I46ec4760c1a8623195700b8cb16f7deafeb1111e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144593 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-12-21tdf#140215 Simplify the handling of .ulf filesIlmari Lauhakangas
Now the headings in the ulf files for .desktop files are in the form [filename_Key] Gallery names are also adjusted to fit the new scheme, where there is no longer a need to pass a --key argument to desktop-translate.py Sync comments with .desktop files and the remaining .ulf and remove obsolete Mandriva Linux meta data while at it. Script to mass-replace relevant names in translations will be provided to infra. Change-Id: I87e8028aa5b66f5f5560efa62ddd9b1e5b61c49c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138455 Tested-by: Jenkins Reviewed-by: Sophie Gautier <sophi@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-12-20gbuild trace: make it work nicer on macOS (seconds-only accuracy)Christian Lohmaier
the finish-gbuild-trace.py matches a nanoseconds timestamp and truncates it to milliseconds, so could also adjust that and look for the unchanged %N for mac in the tracefile and handle it that way, but since there is another conditional needed for the lack of flock on macOS doing it in the makefile seemd like the more natural choice. (well, not trictly needed unless you mind the thousands of command not found messages :-)) Change-Id: I768bc9dd8be232567644ae000b6419bb87f58509 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144590 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-12-20gbuild trace: fix mismatching start/end category in Extension.mkChristian Lohmaier
Change-Id: Ia4320ae7d4d7345f280bdb29f938a338970238f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144589 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-12-20fix gbuild trace when building with translationsChristian Lohmaier
the gb_Trace_StartRange expands to echo "…" >> logfile if tracing is enabled, so when using line-continuation it needs to be terminated with a ; to not cause syntax errors when making the target (or as in this patch moved to a location where it can be a recipe line by itself) Furthermore the startRange and endRange calls were split across the two different branches of the $(if ..) function, so tracing never worked, even when not building with translations - there it just didn't break the build… Change-Id: I601f516872cb9a099eae642bbd8629e75e8250cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144542 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-12-20make inclusion of config_host.mk unconditionalCaolán McNamara
to get make vcl.build not to error with core/solenv/gbuild/LinkTarget.mk:932: *** used LinkTarget StaticLibrary/libzlib.a not defined. Stop. make: *** [Makefile:121: vcl.build] Error 2 since: commit b688b779ba20a4bec653808a42fe88cfac851029 Date: Fri Dec 16 18:41:13 2022 +0100 keep environment clear of SYSTEM_FOO vars Change-Id: I14c3b09ad8e2ce97066995ed63d67243b8ca4a0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144586 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2022-12-19keep environment clear of SYSTEM_FOO varsChristian Lohmaier
those are only meant to be used by the build system (primarily RepositoryExternal.mk) - of course no rule without exception: concat-deps reads SYSTEM_BOOST from env, so set it in the corresponding recipe lines Change-Id: I83c88fc6ad4467b429771c43650fe7fc0ccde407 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144343 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-12-14Fix typoAndrea Gelmini
Change-Id: I1d50f4b47ba32ee6dfd76d3165f15903746de46c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144112 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-12-14Fix prepending xargs to gb_ExternalExecutable_get_command, core partStephan Bergmann
...as was done in <https://git.libreoffice.org/help/+/f048f02f505704a76c4f01b4ff3f369e8ed928b5%5E!> "hid2file.js generation: process in batch, not each file one-by-one", causing my build to fail with > [XSL] CustomTarget/helpcontent2/help3xsl/hid2file.js > xargs: LD_LIBRARY_PATH=/home/sbergman/gcc/trunk/inst/lib64:/home/sbergman/lo/core/instdir/program:/home/sbergman/lo/core/instdir/program: No such file or directory Change-Id: I5a58874aa746de13cfc86b691c11349196092dce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144151 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-13don't rebuild Gallery themes if nothing changedChristian Lohmaier
Change-Id: I49fe9d36550a3f712be57fd4e67f0606ee8feea9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143909 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-12-13use $(file …) directly instead of gb_var2file when not used as intermediateChristian Lohmaier
i.e. when the temporary file is not uses as a responsefile for another command, but instead the point of running gb_var2file is to have that file as a result in the end. also move the helper into the main gbuild.mk and remove Tempfile.mk Change-Id: I79382bef5d7e8a155ba6a8e0750c6a17da42eb37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143912 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-12-13gb_var2file: remove now unused chunk-size parameterChristian Lohmaier
that parameter did specify how many entries of the list the workaround method could use to not exceed commandline length limits, so it was a guess of sorts and many places didn't actually bother with tweaking that value anyway and just used 100. the $(file …) function doesn't care about that, so the parameter was always ignored in that case. Change-Id: If89ec3a1968be297c0fe7c65336c5a965598f0c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143911 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-12-13bump minimum make version to 4.0 (for $(file …) function)Christian Lohmaier
This already was a requirement for Windows for a few years now, and make 4.0 was released nearly 9 years ago, and it has been used in LO's build system since it has been added 11 years ago while it was only available in prerelease versions of make, providing an alternative workaround for systems that didn't have make built from cvs… I guess it is finally time to get rid of those workarounds and just require make 4.0 for everyone. NOTE: reading files with the $(file …) function was only added with version 4.2 of GNU make, and just using it without contents was added in 4.1, so those usages aren't supported Change-Id: Ia1c2c86cfdbbd81f349bb9f7188299e16bdd155f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143910 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-12-12lld 16 trunk defaults to --no-undefined-version nowStephan Bergmann
...since <https://github.com/llvm/llvm-project/commit/241dbd310599e3c1a0f1b0c9ced14c8b8760539e> "[ELF] Enable --no-undefined-version by default", causing e.g. > ld.lld: error: version script assignment of 'PRIVATE_1.4' to symbol '_ZN3sal13backtrace_getEm' failed: symbol not defined > ld.lld: error: version script assignment of 'GLIBCXX_3.4' to symbol '_ZNSs4_Rep20_S_empty_rep_storageE' failed: symbol not defined while building Library_sal and > ld.lld: error: version script assignment of 'LIBXML2_2.4.30' to symbol 'xmlXPtrBuildNodeList' failed: symbol not defined > ld.lld: error: version script assignment of 'LIBXML2_2.4.30' to symbol 'xmlXPtrEvalRangePredicate' failed: symbol not defined > ld.lld: error: version script assignment of 'LIBXML2_2.4.30' to symbol 'xmlXPtrFreeLocationSet' failed: symbol not defined [...] while building ExternalProject_libxml2 (and the latter is the reason to add to USE_LD rather than gb_LinkTarget_LDFLAGS, so that this also goes into gb_ExternalProject_get_link_flags). This is only relevant for ELF targets, so at least for now add it to linux.mk rather than the general com_GCC_defs.mk. Change-Id: I2ea227bd9392c406e6c41de61df37ad7fe155c07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143981 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-05gb_LinkTarget_use_clang: only use flto=thin with clang, not with gccChristian Lohmaier
The code always used flto=thin, but gcc doesn't know that switch and fails. The gb_Library_use_clang used by Skia is actually a prefer clang option, and the corresponding gb_LinkTarget_use_clang macro accounts for that by using "$(or clangvalue,gccvalue)" to define variables. This is OK for stuff that defaults to empty value when no clang is found on the system, but gb_CLANG_LTOFLAGS is defined unconditionally (in com_GCC_defs.mk), so using the $(or..) function is completly bypassed, always using the flto=thin switch. Change-Id: I903e5e4818b8ecbe63ed85952b8741140972e8d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143572 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-11-30Add LOKit functions and whitelist export for it to WASMThorsten Behrens
For calling into LOWA from native JS, make lokit functions available Change-Id: I6458806f33131e48692f35f2a2438b35efb1f06c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143497 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-11-28WASM gbuild: write link dependencies into a file $@.linkdepsMichael Stahl
The static build was added in commit dc9ccf3d8f294cd7ae9d5bece7b6c16c3b22f6a5 and commit b04be559ddf4a7f0a5cdc0b9abc2bcfc4aae25cc and there are several files written to workdir/LinkTarget/*/*.d.{libraries,externals,statics} that list all the (recursive) dependencies of a LinkTarget. Unfortunately the content of these files requires gbuild to interpret, because it's using the Library names which may not map 1:1 to file names, not to mention "externals"; this is all resolved by calls to gb_LinkTarget_use_* anyway. To get a command line that's usable outside of gbuild, write another file $@.linkdeps as a side effect of gb_LinkTarget__command_dynamiclink. Change-Id: I94f31142413561dcdb56fa722a4517f84fcd7d61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143393 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2022-11-28WASM gbuild: avoid annoying python warnings from emscriptenMichael Stahl
/home/builder/emsdk/upstream/emscripten/tools/building.py:1228: ResourceWarning: unclosed file <_io.BufferedReader name='/data/lo/build_feature_wasm/workdir/LinkTarget/StaticLibrary/libdtoa.a'> header = open(filename, 'rb').read(8) ResourceWarning: Enable tracemalloc to get the object allocation traceback Change-Id: I5cd052cd47af92e18cb6ccce31d4503a322d815b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143389 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-11-24Expansion of $(dir ...) always ends in a slash, no need for an additional oneStephan Bergmann
Change-Id: I06172beeeccffd54feb1e1083f0ceef203423ab1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143206 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-24Drop redundant -Wnon-virtual-dtorStephan Bergmann
Inspired by <https://gcc.gnu.org/pipermail/gcc-patches/2022-November/607102.html> "[PATCH] doc: -Wdelete-non-virtual-dtor supersedes -Wnon-virtual-dtor", drop explicitly enabling -Wnon-virtual-dtor in favor of -Wdelete-non-virtual-dtor, which is already enabled by -Wall. (-Wdelete-non-virtual-dtor first appeared in Clang 3.0, <https://github.com/llvm/llvm-project/commit/8bd428574c717e68a8274739d2ba0f6dc16fd0fb> "Add new warning that warns when invoking 'delete' on a polymorphic, non-final, class without a virtual destructor", and GCC 4.7, <https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=014ab419efc12a59efebd2720d79e1c055675c85> "invoke.texi: Document -Wdelete-non-virtual-dtor. [...]") Dropping the explicit setting of -Wnon-virtual-dtor (and nowhere setting it implicitly via -Weffc++) means we can get rid of lots of places that either set -Wno-non-virtual-dtor or use some pragma to ignore -Wnon-virtual-dtor. (In various places across extensions/source/activex/ and winaccessibility/, the commits f26996bd3398afa789a5491968244563ccf70908 "Silence -Werror,-Wnon-virtual-dtor in generated so_activex.h (clang-cl)" and c6086ca6535692496fbd718d174d8eb5a5dea7c7 "Silence -Werror,-Wnon-virtual-dtor in generated UAccCOM.h (clang-cl)" had singled out some includes to wrap them in pragmas. Now that those pragmas are gone again, move those includes back to where they had been prior to being singled out. And the -Wno-non-virtual-dtor in external/firebird/macos-arm64.patch.0 appeared first in ccd0e5f445d4a7d0e7aca6c23c02c61bf14510b2 "Make firebird build for macOS on arm64", which, though it doesn't state it explicitly, apparently created that patch's builds/posix/prefix.darwin_arm64 as a copy of firebird's already existing builds/posix/prefix.* files, which routinely include that warning option too, so keep it there too even if it is probably irrelevant throughout.) Change-Id: I7e4fa9f2c07e267b2ed15607905027f6b78142f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143182 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-21Avoid external processes picking up instdir/program/libxml2.so.2Stephan Bergmann
...which is a problem in ASan builds, as seen with a failing `make check`: > xgettext: symbol lookup error: .../instdir/program/libxml2.so.2: undefined symbol: __asan_init > xgettext: symbol lookup error: .../instdir/program/libxml2.so.2: undefined symbol: __asan_init > xgettext: symbol lookup error: .../instdir/program/libxml2.so.2: undefined symbol: __asan_init > xgettext: symbol lookup error: .../instdir/program/libxml2.so.2: undefined symbol: __asan_init > xgettext: symbol lookup error: .../instdir/program/libxml2.so.2: undefined symbol: __asan_init > Traceback (most recent call last): > File ".../solenv/bin/uiex", line 25, in <module> > input = check_output(["xgettext", "--add-comments", "--no-wrap", ifile, "-o", "-"], encoding="UTF-8") > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib64/python3.11/subprocess.py", line 465, in check_output > return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib64/python3.11/subprocess.py", line 569, in run > raise CalledProcessError(retcode, process.args, > subprocess.CalledProcessError: Command '['xgettext', '--add-comments', '--no-wrap', '.../basctl/uiconfig/basicide/ui/basicmacrodialog.ui', '-o', '-']' returned non-zero exit status 127. > Error: Failed to execute .../solenv/bin/uiex -i .../basctl/uiconfig/basicide/ui/basicmacrodialog.ui -o .../workdir//pot/basctl/messages.pot The solution is similar to e854abe076155fc085b56549ced50b3ee9a095d2 "Avoid external processes picking up instdir/program/libnspr4.so" used in various tests. And as Executable_localize appears to only be called in that one place in the recipe of `make translations`, for simplicity make the library path override a required fourth argument for that executable. Change-Id: Ia6326ac0bb12ea75a8b3df51f7fbf12b88aca634 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142999 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-11-10Add riscv64 supportSakura286
1. Configure gbuild 2. Add UNO Bridge for riscv64 Till now base function works well on riscv64. The bridgetest has passed. Test on Debian, Gentoo and openEuler. Credits: - Heiher <r@hev.cc> and Stephan Bergmann <sbergman@redhat.com> The riscv64 bridge implementation refers to mips64 and AArch64 bridges. - Bo Yu <tsu.yubo@gmail.com> configures gbuild for riscv64. - WANG Xuerui <xen0n@gentoo.org> provides lots of guiding tips. Change-Id: Ifad3b0de8b2c9e7328627ed03396bbd45a9c71e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137445 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2022-10-19Make MSVC -showIncludes processing more reliableStephan Bergmann
With the Windows display language set to "Portuguès (Brasil)" (and the corresponding Visual Studio language pack installed), configure.ac detected SHOWINCLUDES_PREFIX to have the value "Observação: incluindo arquivo:" in UTF-8 (i.e., with bytes ... C3 A7 C3 A3 ...). However, for whatever reason filter-showIncludes.awk apparently didn't manage to match the input it receives against the value of that environment variable, and the Cygwin terminal contained output lines starting with either > Observa□ao: incluindo arquivo: (with toplevel plain `make`, plain `make` in a module, and `make -O` in a module) or > Observaçao: incluindo arquivo: (with toplevel `make -O`). (Note how "ç" is either garbled as "□" or shown correctly, and "ã" is always shown as plain "a".) It's not quite clear to me where exactly this garbling happens, and why the behavior is apparently different in configure.ac vs. make. The most reliable way to avoid these issues altogether is to force MSVC to emit English diagnostics, via VSLANG=1033, as explained at <https://stackoverflow.com/questions/2286216/how-to-change-msbuild-error-message-language>. (I didn't find any official documentation of that environment variable on MSDN though. Thanks to Mike Kaganski for providing that Stack Overflow link.) dfbce2a556972f552d194d2358c170077915d776 "gbuild: try to run filter-showIncludes.awk in C locale" had started to call that AWK script with LC_ALL=C (and subsequent commits had copied that LC_ALL=C in calls to similar AWK scripts). But that appears to neither be sufficient (see above) nor necessary now, so I removed all those LC_ALL=C settings. (There is a gawk --characters-as-bytes option, but trying that out didn't make a difference for this issue.) clang-cl doesn't support VSLANG, nor does it generate localized diagnostics in the first place, but lets consistently add VSLANG=1033 when determining LO_CLANG_SHOWINCLUDES_PREFIX in configure.ac, too. (The way VSLANG=1033 is set in gb_CObject__compiler in com_MSC_class.mk, it affects all kinds of MSVC and clang-cl invocations, whether or not they actually honour that environment variable.) Change-Id: I52d0e842d200ed256a44d6cc5de1b3868c0acc71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141524 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-11[COVER] add first set of ODF feature test filesThorsten Behrens
For providing coverage data of features in the LibreOffice code base, here's a set of files with orthogonal, high-level ODF features like bold & italic text, an image, a table in several variants etc. Use `make coverage` or `make sw.coverage` to generate coverage data for the entire code base, or subsets thereof. Change-Id: If27f720e8728788c421e16a3abbc1cf39521a2fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139765 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-09-02Fix setting SAL_NON_APPLICATION_FONT_USEStephan Bergmann
...after a342b72f4218cd617aa6fb413fcf5fbb182c316f "gbuild: set SAL_NON_APPLICATION_FONT_USE in gb_CppunitTest_use_more_fonts" had caused e.g. CppunitTest_vcl_pdfexport to be executed with merely SAL_NON_APPLICATION_FONT_USE=deny rather than the stronger SAL_NON_APPLICATION_FONT_USE=abort that vcl/CppunitTest_vcl_pdfexport.mk asked for. So introduce a dedicated gb_CppunitTest_set_non_application_font_use that accumulates the requested modes and then selects the strongest requested one ("allow" over "abort" over "deny"). That also means we can go back to model "allow" with an unset SAL_NON_APPLICATION_FONT_USE env var. Change-Id: I32ba0a94c1965f0e3336e676b17f4f5efb85efce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139251 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-01gbuild: set SAL_NON_APPLICATION_FONT_USE in gb_CppunitTest_use_more_fontsKhaled Hosny
So it applies to all tests using HAVE_MORE_FONTS. Change-Id: I60567c996286aa8a76c7180c58aea7f214a99d87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139144 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-11Add loongarch64 support.wjh-la
Loongarch is a new RISC ISA , which includes a 32-bit version and a 64-bit version, Here are some documents about Loongarch: https://github.com/loongson/LoongArch-Documentation. The loongarch64 bridges implementation refers to mips64 bridges, and the code related to abi and asm has been modified Change-Id: I1d9cd3aadf63046c8cdecc9a64842567bfa1cecc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137486 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-06turn on -Wshadow-all for clang compilersNoel Grandin
mostly so that it matches the existing behaviour of the GCC compiler, which makes it easier submitting patches when building locally with clang Change-Id: I0197ec61bc97a3899c2b379efa0f2ad8ed028986 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137896 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-27rename GODSON/GODSON64 to MIPS/MIPS64Rene Engelhard
as that what it actually is and the compiler defines are already -DMIPS/-DMIPS64 anyway (as are the PLATFORMID and the bridges' name mips/mips64) Change-Id: I274e7a3b0e140375a8e697c1790cbdb972251d29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137489 Tested-by: René Engelhard <rene@debian.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: René Engelhard <rene@debian.org>
2022-07-18Mend python support for lldb cppunit tests.Hannah Meeks
Change-Id: I02f4872ac75d82f2d77c1854ce040b72883b484a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137204 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-07-14Change make file so that debugging works - Previous error:Hannah Meeks
hannah@localhost:~/master/sw> make CppunitTest_sw_macros_test CPPUNITTRACE="gdb --args" [CUT] sw_macros_test S=/data/opt/libreoffice/master && I=$S/instdir && W=$S/workdir && mkdir -p $W/CppunitTest/ && rm -fr $W/CppunitTest/sw_macros_test.test.user && cp -r $W/unittest $W/CppunitTest/sw_macros_test.test.user && ( MAX_CONCURRENCY=4 MOZILLA_CERTIFICATE_FOLDER=dbm: SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION=1 SAL_USE_VCLPLUGIN=svp LIBO_LANG=C icerun PYTHONWARNINGS=default gdb -return-child-result -ex "add-auto-load-safe-path $S/instdir" -ex "set environment LD_LIBRARY_PATH ${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"$I/program:$I/program":$W/UnpackedTarball/cppunit/src/cppunit/.libs" -ex 'set environment MALLOC_CHECK_=2; set environment MALLOC_PERTURB_=153' --args $W/LinkTarget/Executable/cppunittester $W/LinkTarget/CppunitTest/libtest_sw_macros_test.so --headless "-env:BRAND_BASE_DIR=file://$S/instdir" "-env:BRAND_SHARE_SUBDIR=share" "-env:BRAND_SHARE_RESOURCE_SUBDIR=program/resource" "-env:UserInstallation=file://$W/CppunitTest/sw_macros_test.test.user" "-env:CONFIGURATION_LAYERS=xcsxcu:file://$I/share/registry xcsxcu:file://$W/unittest/registry" "-env:UNO_TYPES=file://$I/program/types/offapi.rdb file://$I/program/types/oovbaapi.rdb file://$I/program/types.rdb" "-env:UNO_SERVICES=file://$W/Rdb/ure/services.rdb file://$W/Rdb/services.rdb" -env:URE_BIN_DIR=file://$I/program -env:URE_INTERNAL_LIB_DIR=file://$I/program -env:LO_LIB_DIR=file://$I/program -env:LO_JAVA_DIR=file://$I/program/classes --protector $W/LinkTarget/Library/unoexceptionprotector.so unoexceptionprotector --protector $W/LinkTarget/Library/unobootstrapprotector.so unobootstrapprotector --protector $W/LinkTarget/Library/libvclbootstrapprotector.so vclbootstrapprotector "-env:CPPUNITTESTTARGET=$W/CppunitTest/sw_macros_test.test" ) ICECC[448] 2022-07-13 13:23:02: couldn't find any PYTHONWARNINGS=default ICECC[448] 2022-07-13 13:23:02: could not find PYTHONWARNINGS=default in PATH. make: *** [/data/opt/libreoffice/master/solenv/gbuild/CppunitTest.mk:121: /data/opt/libreoffice/master/workdir/CppunitTest/sw_macros_test.test] Error 115 hannah@localhost:~/master/sw> Change-Id: Idebbd385f70edd9b691d91f6eded8ee02ac9cce7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137032 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-12unittest: Split out registry entries to alter UI definition search pathColomban Wendling
Accessibility tests will require testing the normal UI, so will need not alter the search path for definitions. It will however benefit from other environmental overrides (locale, fonts, etc.). The solution here splits out to a separate registry the piece of configuration that alter the UI, so users can select the features set they need. The default gb_CppunitTest_use_configuration is updated to keep working the same as before, using both layers. gb_CppunitTest_use_unittest_configuration is replaced by specific ones for each configuration layer, and the two direct call sites removed as they were redundant anyway (gb_CppunitTest_use_unittest_configuration is only a subset of gb_CppunitTest_use_configuration). New macros are gb_CppunitTest_use_common_configuration for the common layer and gb_CppunitTest_use_user_ui_configuration for the UI one. Change-Id: I75f82092079752b4e173e48ab463636e7b7515b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136997 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-10[API CHANGE] Remove deprecated idlc and regmerge from the SDKStephan Bergmann
* Client code must replace uses of idlc and regmerge with uses of unoidl-write, see the changes to odk/examples/ and ure/source/uretext/ in 40f2aee6584eafcf4cd1d95fcf1f775e5435440d "Provide unoidl-write also for the SDK" for examples. * The new types.rdb format is not compatible with LibreOffice < 4.1. Clients generating extensions containing such files are advised to use appropriate LibreOffice-minimal-version elements. * For compatibility with old extensions, reading the legacy types.rdb format is still supported. * The SDK no longer ships an idl/ sub-directory containing the udkap and offapi .idl files (as, unlike idlc, unoidl-write does not need them). odk/config/cfgWin.js had to be adapted to look (somewhat arbitrarily) for an examples/ sub-directory instead of idl/ when checking for "an sdk folder". gb_UnoApi_package_idlfiles became unused and has been removed. * The idlc and regmerge executables have been removed. Module idlc has been removed except for idlc/test/parser/, which is also used by CustomTarget_unoidl/unoidl-write_test, and which may eventually be moved into module unoidl. Module external/ucpp and the corresponding configure options have also been removed. Change-Id: I42a0231699b863b5ebe2bee63bc32c8f79278cc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122363 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-08it is not our job to tell GCC whether to colorize its outputLuboš Luňák
GCC's -fdiagnostics-color option is complex (read: brain-damaged), since it depends on how the compiler was configured during building it (https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html). So while with Clang coloring works out of the box and the option can be used for force it in special cases, GCC depending on how it's been built may (or may not) require the option explicitly just to do the sane default. 13b52f50e52d226c935dcb94fac641c59a77f13f added an explicitly =auto to handle that, and then 9ab2703d5c212746c961dcb238a4c3025d3a2587 changed it to =always depending on gb_COLOR to prevent it from overriding explicitly used option. This results in a possible massive rebuild when redirecting build output (because e.g. PCHs get rebuilt if build flags change, and ccache I think cannot use cached compilations either). It should not be gbuild's job to go out of its way to handle broken tooling, so just revert both of those. If somebody uses such a lame GCC build, either don't do that, add those explicit flags to CXX/ENVCFLAGSCXX, or create a clean way to add flags to CXXFLAGS or something. Change-Id: Ieac6ac7dd198639529aba8f47983587771772349 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135467 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-05-26use at least assertions mode if libc++ debug mode is not usableLuboš Luňák
This way at least e.g. std::vector::operator[] will still check bounds even though things like iterator debugging will not work. Change-Id: If3c550cfec68eee9a19050fc8e60fca07148b4a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134946 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-05-16enable libc++ debug mode again if availableLuboš Luňák
Now includes a configure check for the std::to_string() crash. Change-Id: I45c3b804b7a1ff5f6520f7bdf772497f72ddee47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134338 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-05-13officecfg,stoc: allow running JVM UNO components out-of-processMichael Stahl
The problem is that 32-bit Win32 applications have very little VM, and soffice.bin can run out, so try to move the JVM to a separate process (uno.bin) and connect to it via pipe. Add a new config to enable this: "org.openoffice.Office.Java/VirtualMachine/RunUnoComponentsOutOfProcess" If enabled, ServiceManager instantiates *all* JVM components out-of-process, by instantiating "com.sun.star.java.theJavaVirtualMachine" out-of-process. To ensure that the remote connection is disconnected at shutdown (and thereby prevent crashes with remote calls during late shutdown), JavaComponentLoader is now a "single-instance" service; this change should be harmless for the default in-process configuration case. Tested with these extensions: Wiki Publisher smoketest TestExtension.oxt odk CalcAddins.oxt Inspector.oxt ToDo.oxt Also passed "make check" on Linux when enabled, if the variable URE_BIN_DIR is set properly for CppunitTest_services. Change-Id: I76bf17a9512414b67dbd20daee25a6d29c05f9d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133218 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-09remove HAVE_LIBCPP_DEBUG (libc++ debug mode)Luboš Luňák
It's currently too broken (https://reviews.llvm.org/D125184), but they're working on fixing it, so hopefully somewhen later. Change-Id: I3ca243a57d41bd9d8c4cdbdc4a6a3b5fdc49e4c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134023 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-05-04Drop --with-iwyu optionGabor Kelemen
Nowadays the bin/find-unneeded-includes script is a better solution for this problem This essentially reverts the commits: c716b3888e7e8150d1c1053ee6550afb56438b1f 096c7e889f3b9bd42a81fb0216e2a68fb27159fc 40e7eecb7efeeb9af59206d7a9c82ac55adf5279 Change-Id: I404a4b34176efaacf961605559af9de6d6cba10a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133540 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-05-03Keep passing LDFLAGS into external proejct buildsStephan Bergmann
...which had been broken with 1ffd6897ddf15624e70585ab08e8af713114c938 "try to use also proper debug LDFLAGS for externals libraries", and e.g. one of my macOS builds uses a non-standard Clang compiler and libc++ library, and thus needs LDFLAGS=-L/Users/stephan/llvm/inst/lib in autogen.input Change-Id: Iae67a4a13603b0241e5cd6c0d01a07ac898ffb58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133746 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-01improve support for using libc++ on Linux and for libc++ debug modeLuboš Luňák
It seems to run slightly faster in --enable-dbgutil mode and also builds a bit faster (at least with Clang). But libc++ on Mac isn't built with debug mode support. Change-Id: Idf5dba9c4a56aba1f4163aa518a78d34b6837149 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133664 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-05-01try to use also proper debug LDFLAGS for externals librariesLuboš Luňák
This is basically ea68de2968c0dbcd8e7549435e829db06795c16d but for LDFLAGS. A number of external libs cannot use this because their libtool mishandles -fuse-ld. Change-Id: Idee379eb0a3afb475b536519ee3de064b4e218f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133639 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-29gbuild: Drop obsolete checks for make version 3.81Michael Weghorn
make 3.81 is no more suppoprted, see commit 4688e74bcf0c58ab1bbf60e9c19331d25ebfe95b Date: Fri Apr 8 11:22:27 2022 +0200 configure: require GNU make 3.82 Change-Id: I0f820512df96fa1712374d3308d15591799222fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133592 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>