Commit graph

1076 commits

Author SHA1 Message Date
LeSci-0x1
c3f0464097 tdf#147021 - Use std::size() instead of SAL_N_ELEMENTS() macro
Change-Id: If8222286f36cda3071d63a14896d8d89c5802437
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177650
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2024-12-02 09:36:19 +01:00
LeSci-0x1
388b8fa5b2 tdf#147021 - Use std::size() instead of SAL_N_ELEMENTS() macro
Change-Id: I3d8b65f0ef386eed2ada12664aa33d2efd53fb65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177641
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-12-02 09:36:11 +01:00
Noel Grandin
2cb43c6b88 clang-tidy: performance-unnecessary-copy-initialization in various
Change-Id: Ib7d75d4d8207261898568402e7983e0f11da14bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176417
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-11 21:02:55 +01:00
Caolán McNamara
ed75a40d3c cid#1606631 Overflowed constant
Change-Id: I5dda80aaa2fa7ec47ad005048ec3738481e5b50c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174491
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-04 20:30:43 +02:00
Caolán McNamara
0e23cabf2f cid#1606631 Overflowed constant
Change-Id: I9ed28057b0435b78743303d1d6edea928598787b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174379
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-02 12:25:51 +02:00
Gabor Kelemen
e1a351ca19 Remove now unneeded osl/diagnose.h
followup to commit 57c228803e

Change-Id: Iebfb23bb65e2bf898bf27f367cc9641f47a14cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167998
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2024-07-20 10:20:31 +02:00
Caolán McNamara
0dcaff6043 WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: I6d1ea7e14f5d2a75d485dae69d51cec8c2343445
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167558
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-05-12 22:14:19 +02:00
Caolán McNamara
c79a48a75f WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: Ica8b3c8c5476f2f0f3bebf0cfcd80b08090c6119
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167556
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-05-12 21:00:09 +02:00
Noel Grandin
927e66058a loplugin:ostr in jvmfwk
Change-Id: Ie21df5b25d15a15ba7a1660970ff7064bb8ec1d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167385
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-09 17:59:26 +02:00
Christian Lohmaier
0c4c84a14b makefile simplification: replace $(call gb_CustomTarget_get_workdir,foo)
…by a simple/static $(gb_CustomTarget_workdir)/foo

The build system has a lot of overly complicated leftovers from when it
was introduced and had not only deal with split repositories but also
had to coexist with another buildsystem. Along with lots of copy'n'paste
along the years the makefiles became hard to grasp for newcomers with
all our calls and evals.
As a first step to streamline that, the macros from TargetLocations that
simply prefix a static path to the argument (and similar of the same
kind) are a natural pick before simplifying the rules themselves/getting
rid of a bunch of eval statements.

Change-Id: Ia06dbbcd5d1994755a2ff05b84f72ccbc4e3cab5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167005
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-05-03 16:06:14 +02:00
Stephan Bergmann
71ee4d75d3 Tie javac -g option to --enable-symbols instead of gb_DEBUGLEVEL
...which appears to be a better fit.  Now, gb_JavaClassSet_JAVACDEBUG is
unconditionally defined as -g, but conditionally only used if
gb_target_symbols_enabled is true for the given target (where the target is
spelled "Jar/..." resp. "CustomTarget_jvmfwk/jreproperties" for the
--enable-sybmols=... mini-language in configure.ac).  Also, the odd special case
to "force debug information for OOoRunner" has just been dropped.

Change-Id: Ief10efc689d65e2f50888d3e96cb40f43cbb1b2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165071
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-03-21 09:41:57 +01:00
Noel Grandin
7840effb1d use more string_view
found by tweaking the stringview loplugin

Change-Id: I92203ba99642bef7951ffa146184c5562cb31d09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163744
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-08 07:06:13 +01:00
Gabor Kelemen
ab95ed2c4b Use less boost_headers in low level libraries
Most of these don't use boost themselves, nor do they need
it transitively since the use of boost::optional was removed

Change-Id: Ic9dee1c4e160b313ec5b91677b02ffdea6c5779d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164440
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-03-06 21:23:17 +01:00
Stephan Bergmann
cdb5f9595f Extended loplugin:ostr: jvmfwk
Change-Id: Ibb17d89a5ed618b4d5e6be9ac9ee89e2751c3ed7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159696
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 07:26:38 +01:00
Stephan Bergmann
cbe3899ed9 Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: jvmfwk
Change-Id: I23ce970ad67047b0b22a9dda3dff047e5f59dff5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158203
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-20 07:58:27 +02:00
Noel Grandin
e266d448f4 loplugin:stringstatic look for more strings
that can be initialised at compile-time instead of runtime

Change-Id: I08d516fdc13a3a79f93c079f89ac44cbc7a1ed71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153620
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-27 13:10:44 +02:00
Samuel Mehrbrodt
7795a2adc0 Allow bootstrap variables in Java user classpath settings, 2nd try
Add a second mode: When a classpath starts with '$', bootstrap variables are recognized.
The classpath must then be provided as URL, not native path.

Change-Id: Idcc229a2b4e9a512b0e712ea932a6e4293907db3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152899
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-06-21 00:45:53 +02:00
Samuel Mehrbrodt
452856addb Revert "Allow bootstrap variables in Java user classpath settings"
This breaks existing paths which contain "\" or "$".

This reverts commit cfc2376f80.

Change-Id: Ia58df0a4f061f45140575e89231bd18d044a9bc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152604
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-06-08 09:18:42 +02:00
Samuel Mehrbrodt
cfc2376f80 Allow bootstrap variables in Java user classpath settings
This allows for relative paths to be configured as Java class path.

Change-Id: Ie3e6bc3836fb316457e5c9f11dfb77d2fcd49ad4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152271
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-05-25 16:19:00 +02:00
Christian Lohmaier
bdd96fb801 accept aarch64 JDK for win/aarch64
the check is only done for windows & mac since the property can have
arbitrary values - in OpenJDK it is hardcoded for windows, but for other
platforms it can come from autoconf. For a more detailed explanation
see f05a42ef8c

Change-Id: I8555ef3b7153a9b744b45cf07deae3c3a1d48ae3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150119
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2023-04-11 12:07:15 +02:00
Noel Grandin
db7f33af14 loplugin:stringadd in various
when applying my upcoming patch to also consider O[U]StringBuffer

Change-Id: I8cf6a47ad357ddc73e2c430d966be72d5efd1485
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149767
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-30 20:03:41 +00:00
Noel Grandin
899dfbca17 elide some temporary OStrings
where we can pass a string_view into OStringToOUString

Change-Id: If7803ba49aa15f6e9c7bd386d32fb84003155390
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148844
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-14 17:50:11 +00:00
Stephan Bergmann
8ef01413f6 Remove support for 32-bit S390
As discussed in the mailing list thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2023-January/089808.html>
"Plan to remove dead C++ UNO bridge implementations (bridges/source/cpp_uno/*)",
the bridge implementation at bridges/source/cpp_uno/gcc3_linux_s390 is
apparently dead and should thus be removed.  However, that was the only bridge
implementation for 32-bit S390, which implies that support for the 32-bit S390
architecture as a whole is dead and should thus be removed.

Change-Id: I18b3b4fa11df4ce693107bad6bbea2fab1c19f26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146058
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-27 07:29:14 +00:00
Stephan Bergmann
70bcf9e8be Remove support for AIX
As discussed in the mailing list thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2023-January/089808.html>
"Plan to remove dead C++ UNO bridge implementations (bridges/source/cpp_uno/*)",
the bridge implementation at bridges/source/cpp_uno/gcc3_aix_powerpc is
apparently dead and should thus be removed.  However, that was the only bridge
implementation for AIX, which implies that support for the AIX platform as a
whole is dead and should thus be removed.

Change-Id: I96de3f7f97d4fd770ff78256f0ea435383688be9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146057
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-27 07:28:16 +00:00
Noel Grandin
4504d6ddf1 loplugin:unusedfields make some fields private
this is one of the secondary analyses this plugin performs

Change-Id: I1c496e234513362338600180e51f7e71e605a7cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143180
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-24 07:00:02 +01:00
Sakura286
bc9487f745 Add riscv64 support
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-11-10 13:47:06 +01:00
Stephan Bergmann
c74133420f tdf#151545: Restrict JvmfwkUtil_isLoadableJVM to macOS x86-64
That check had been added with 32bc8ddbf3
"tdf#94716 allow Oracle's JDK to be used on OS X 10.10 and 10.11", back at a
time when there was substantial trouble with installations of Apple's own Java
and Oracle JREs.  One consequence of that commit and its
JvmfwkUtil_isLoadableJVM check was that on macOS we only supported JDKs (with a
surrounding Contents directory containing an appropriate Info.plist files), not
plain JREs (cf. <https://wiki.documentfoundation.org/ReleaseNotes/5.1#macOS>
"Prior work arounds of having both an Apple JRE 6 and an Oracle JRE 8 are no
longer sufficient.  Use of the JDK is now hard coded, see tdf#74877, tdf#94716
and core commit 32bc8ddbf335dd26019edcf12758643b4cff9913.")

However, Apple's own Java is long since deprecated (cf.
<https://support.apple.com/en-us/HT204036> "You can also download legacy Java SE
6 from Apple if you’re using an app that specifically requires this unsupported,
out-of-date version."), and presumably of no practical concern at least on
contemporary Aarch64-based macOS.

And there is e.g. SDKMAN! (<https://sdkman.io/>), which installs JDKs in a way
that they are not surrounded by Contents directories containing appropriate
Info.plist files, so JvmfwkUtil_isLoadableJVM returned false for them and you
couldn't add them on the LibreOffice Advanced Options tab.

So at least for Aarch64-based macOS, drop that presumably-legacy
JvmfwkUtil_isLoadableJVM check (but keep it for x86-64--based macOS at least for
now, just to be safe).  (That implies that for Aarch64-based macOS, it should
now work again to also use plain JREs.)

Change-Id: I3bcbb3c14e3a9e9dde39fd6f4572b632e05df9e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141508
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-10-18 19:15:07 +02:00
Stephan Bergmann
93e234c45c Fix a misuse of two-argument std string_view rfind
...introduced in 655b6c2f46
"loplugin:stringviewparam".  Unlike its O[U]String lastIndexOf(x, n)
counterpart (which looks for the last x whose end position, exclusive, is <= n),
string_view rfind(x, n) looks for the last x whose start position, inclusive, is
<= n.  (So here would have left slash unchanged.)  (And the seemingly simpler

  jvm_dll.rfind('\\', slash - 1)

would fail when slash is zero, as in that case it would call rfind with a second
argument of npos, i.e., search for the last '\\' in the complete jvm_dll.)

Change-Id: I148a5db860d4b9e9d58a4a8847880a7a7020c5a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140486
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-23 15:52:21 +02:00
Caolán McNamara
6352710e02 try harder to remove "OSL_PIPE" pipe on SIGTERM
a) When oosplash got SIGTERM it used SIGKILL on soffice.bin, (concealed
behind osl_terminateProcess) so soffice.bin has no chance to cleanup.

Try SIGTERM, followed by SIGKILL if that doesn't work, to give
soffice.bin a chance.

b) java intercepts SIGTERM so if JNI_CreateJavaVM was called then
our SIGTERM handler doesn't get called. Add -Xrs to jvm args to
avoid this.

Change-Id: I09f93d8093bc7c094482eda73b4eadc5a6cebb83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140152
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-19 18:28:33 +02:00
wjh-la
d3625d9689 Add loongarch64 support.
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-11 10:53:00 +02:00
Noel Grandin
faa40c022c elide some makeStringAndClear() calls
Change-Id: I8636102554a76f2ba3f6297219b40761473a4489
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137285
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-21 11:01:22 +02:00
Noel Grandin
49fdae5bb4 clang-tidy modernize-pass-by-value in io..jvmfwk
Change-Id: I6e19d4d03957c35caa79a231927eae04ae630442
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136209
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-21 12:59:41 +02:00
Noel Grandin
9f1701d01d use more o3tl::getToken
found by inspecting call sites of OUString::getToken

Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05 12:57:00 +02:00
Stephan Bergmann
c7b923a9eb Some JREs need the bin/server/jvm.dll path after all
...which had been removed in 18bdf78e15 "Azul is
just another OpenJDK variant", when fixing the previously mis-classified Azul
JRE from "uses OtherInfo" to "uses SunInfo".  But the IBM Semeru Runtime
(<https://developer.ibm.com/languages/java/semeru-runtimes/downloads/>) is
another arguably mis-classified case due to its java.vendor of "IBM Corporation"
(and where the

    VENDOR_MAP_ENTRY<OtherInfo>("IBM Corporation"),

line in jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx might be relevant for
some other JRE from IBM; at least, that entry is present ever since the
introduction of vendorlist.cxx in 738e9b77b9
"INTEGRATION: CWS jl8").

So just generally support the bin/server/jvm.dll path here for "uses OtherInfo",
even though it should actually only be necessary for "uses SunInfo".

(See the mail thread starting at
<https://listarchives.libreoffice.org/global/users/2022/msg00246.html>
"[libreoffice-users] LibreOffice 7.3.3.2 Windows 64 bit seems not detect
AdoptOpenJdk JRE Windows 64 bit runtime".)

Change-Id: I3a4d02309b7c833c3cd32dc2dda4f4cb7b216693
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133827
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-04 18:16:36 +02:00
Noel Grandin
65e846d73c use more string_view in jvmfwk
Change-Id: I05f3b171578b8fef5b15dcbbf10ae9b7cf2d1b02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133075
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-15 21:33:17 +02:00
Noel Grandin
fdfd517a6f loplugin:stringviewparam whitelist some more functions
for which we have o3tl:: equivalents

Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13 08:38:53 +02:00
Noel Grandin
cbaf1fbaa6 loplugin:stringview more o3tl conversion
look for call sequences that can use string_view and the new o3tl
functions in o3tl/string_view.hxx

Also add a few more wrappers to said #include file

Change-Id: I05d8752cc67a7b55b0b57e8eed803bd06bfcd9ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132840
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-12 12:42:15 +02:00
Stephan Bergmann
655b6c2f46 loplugin:stringviewparam
Change-Id: I62a7534844006a7bf3c2ece5e5d2f8b739a15b9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132762
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-10 13:08:04 +02:00
Stephan Bergmann
8e6462571b Allow for java.version consisting of four dotted segments
...like "11.0.14.1" reported now by
java-11-openjdk-headless-11.0.14.1.1-5.fc35.x86_64, and which caused

> warn:jfw:274674:274674:jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx💯 [Java framework] sunjavaplugin.so does not know the version: 11.0.14.1 as valid for a SUN/Oracle JRE.

(For simplicity, cover it with the same code block that already covers a
potential "_01" etc. part following the official(?) three dotted segments.)

Change-Id: Id98235d3be59653ab412f9b6c1ffbf3b0470bd6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131586
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-15 13:46:06 +01:00
Noel Grandin
7002caa97e new loplugin:trivialdestructor
look for potentially trivial destructors that can then be elided

Change-Id: I435c251bd4291b5864c20d68f88676faac7c43fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131318
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-11 09:06:06 +01:00
Stephan Bergmann
79c2398b80 Replace some fprintf with SAL_WARN
Change-Id: I3f31f223b6e906c6b40415a8d5c66c27e3c7cff5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130338
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-22 13:53:44 +01:00
Stephan Bergmann
14a8eecaa4 Remove a debug-style fprintf
...that had been added in 811de66d7f "First
attempt at getting access to the Java VM on Android", together with another

  fprintf(stderr, "Got lo_get_javavm = %p", lo_get_javavm);

that had meanwhile been removed again in
5510127e89 "Android code refactorig and hacking"

Change-Id: I1a50563e2af1ea5a0ecbd2cc9d49d70c6e5bbbd3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130337
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Jenkins
2022-02-22 13:15:41 +01:00
Stephan Bergmann
5e8f64e50f Avoid unnecessary empty -Djava.class.path=
Change-Id: Idcfe7321077b60381c0273910b1faeb444ef1fd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130242
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-21 15:37:27 +01:00
Gabor Kelemen
67478f9d63 Recheck modules [i-l]* with IWYU
See tdf#42949 for motivation

Change-Id: I758bb27e93779e3df21c463714e49354748f446f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128715
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-01-27 18:52:16 +01:00
Noel Grandin
dbc5519e9d loplugin:unnecessaryvirtual
Change-Id: I231195c36d620254cbcd2f4d7bbb9044f7887fe8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126413
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-07 07:05:29 +01:00
Stephan Bergmann
af9ae2d6a9 There was a typo in the AdoptOpenJDK java.vendor property value
...ever since 61c4f96d6a "Support AdoptOpenJDK":
At least the old AdoptOpenJDK 1.8.0_275 I had lying around on macOS reported it
as "AdoptOpenJDK", not "AdoptOpenJdk".  But instead of fixing all occurences of
"AdoptOpenJdk", we can just as well get rid of that vendor listing completely
now after 3d27b2fa9c "tdf#124503: Support JRE
installations with unknown java.vendor property" and
3460c16d7f "Make getVersionInformation always
return a VersionInfo ...even for JREs not listed in javavendors.xml, making it
default to a VersionInfo with sMinVersion = "1.8.0".  (For a rationale for not
updating the <updated> elements of the modified
jvmfwk/distributions/OpenOfficeorg/javavendors_*.xml see the commit message of
95c38f6d77 "Drop support for dead GNU Java".)

Change-Id: Iea34914201f604a0665a86dd07724628fa021c90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125402
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-18 09:48:53 +01:00
Stephan Bergmann
f05a42ef8c tdf#144695 VendorBase::isValidArch also for macOS
Lets extend it only to macOS (where there is some confusion now with Rosetta-
translated vs. native processes on Apple M1 machines), not to all Unix-like OSs:
The comment that it "is not defined what the exact [os.arch] values are" is
still relevant.  At least for OpenJDK, while Windows has a hardcoded list of
possible values in GetJavaProperties at
<9604ee8269/src/java.base/windows/native/libjava/java_props_md.c (L568)>,
the corresponding non-Windows code in GetJavaProperties at
<319a3b9947/jdk/src/solaris/native/java/lang/java_props_md.c (L175)>
uses ARCHPROPNAME which, via

> -DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'

at
<c363db8ed0/jdk/makefiles/CompileNativeLibraries.gmk (L185)>,
appears to somehow come out of Autoconf at
<228c21635b/common/autoconf/spec.gmk.in (L93)>,
so probably can show some variance in actual values being used.

Change-Id: I16725cd9365f6bd034372c653aa43ab84d487b98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125401
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-17 16:53:47 +01:00
Stephan Bergmann
b9ecede576 Don't fail jfw_findAllJREs for just one JRE of WrongArch
...otherwise if one such JRE had found its way into a user's configuration,
"Tools - Options... - LibreOffice - Advanced" would no longer show *any* JREs.

Regression introduced with 9143dd4ebe "Related
tdf#54443 List only matching JREs", which added WrongArch to the javaPluginError
enum.

Change-Id: I51fd47e585c6686be7a9282615c0978e4f6c460b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125396
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-17 15:46:44 +01:00
Noel Grandin
1170db278d rtl::Static->thread-safe static in jvmfwk
Change-Id: I049148d82eb306e8ba7fdc9f0cc650f45b05da0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125257
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-16 12:29:38 +01:00
Stephan Bergmann
81debfba86 Restrict macOS ARM64 to Java >= 17
The commit message of e529461bcb "Enable JVM also
on macOS ARM64" had identified
<https://cdn.azul.com/zulu/bin/zulu17.0.63-ea-jdk17.0.0-ea.27-macosx_aarch64.zip>
"to work reliably now" while other (older Zulu) JVMs "have always crashed with
SIGBUS that smelled like our uses of pthread_jit_write_protect_np in
bridges/source/cpp_uno/shared/vtablefactory.cxx colided with corresponding calls
in the in-process JVM".  Those observations would be in line with
<http://openjdk.java.net/jeps/391> "JEP 391: macOS/AArch64 Port" only
implemented for Java 17 now (see
<dbc9e4b50c>
"8253795: Implementation of JEP 391: macOS/AArch64 Port").

So for macOS ARM64 assume that all OpenJDK variants (i.e., providing an empty
jvmfwk/distributions/OpenOfficeorg/javavendors_macosx_aarch64.xml) of at least
Java 17 (i.e., building on recent 3460c16d7f
"Make getVersionInformation always return a VersionInfo" and "change the
hardcoded '1.8.0' to '17' for just that one platform") work.

Change-Id: I11e8ba232cee066a25a49edebd0cc50e24e84124
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123989
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-21 15:13:42 +02:00