> On 28 Sep 2025, at 7:31 pm, Chris Sherlock <[email protected]> wrote:
>
>
>
>> On 28 Sep 2025, at 4:06 pm, Chris Sherlock <[email protected]>
>> wrote:
>>
>>
>> Sent from my iPhone
>>
>>> On 28 Sep 2025, at 12:58 am, Patrick Luby <[email protected]> wrote:
>>>
>>>
>>>
>>>> On Sep 26, 2025, at 10:35 PM, Chris Sherlock <[email protected]>
>>>> wrote:
>>>>
>>>> It is :-) that seems to a Darwin command, is that a script I don’t know
>>>> about?
>>>
>>> The script is the ./configure command at the top of the source tree. When
>>> you run ./autogen.sh, it runs “autoconf” to create the ./configure script
>>> form ./configure.ac and then ./autogen.sh runs ./configure with all of the
>>> settings in your ./autogen.input if it exists.
>>>
>>> The chunk of the ./configure script that checks the meson version on macOS
>>> is in the following Gerrit patch. That is where there is an “if $_os is
>>> Darwin and the macOS SDK is >= to 260000” command that I was referring to:
>>>
>>> https://gerrit.libreoffice.org/c/core/+/188863/8/configure.ac
>>>
>>> BTW, $_os is set to “Darwin” on macOS. Presumably from “uname“. That
>>> command with no arguments returns “Darwin” for me. “uname -5” returns
>>> "uname: illegal option — 5” so are you using something other than
>>> /usr/bin/uname?
>>>
>>> Patrick
>>
>> Sorry, that was a typo - I meant uname -r
>>
>> I appreciate the explanation, my shell scripting skills are obviously rusty!
>> The script appears fine, but the option in the compiler_commands.json is
>> definitely wrong.
>>
>> Is the harfbuzz compiler_commands.json generated by a script?
>>
>> Chris
>
> So I have done a bit of digging, and the meson.build needs to detect the
> version of macOS being used.
>
> So after a bit of research, I worked out the following code snippet that you
> add after the project() directive in the root meson.build file in harfbuzz:
>
> if host_machine.system() == 'darwin'
> if host_machine.cpu_family() == 'aarch64' or host_machine.cpu_family() ==
> 'x86_64'
> # Set the hardening mode for C and C++ compilers
>
> add_project_arguments('-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE',
> language: ['c', 'cpp'])
> # Undefine the old macro to ensure it's not used
> add_project_arguments('-U_LIBCPP_ENABLE_ASSERTIONS', language: ['c',
> 'cpp'])
> endif
> endif
>
> The problem is… how on earth is that generated? It does seem like a Harfbuzz
> issue… but I don’t know how we propose a change like this…
>
> Chris
Ugh… when I think about it, that will just give us the architecture… I believe
this directive works on llvm > v17…
Sorry, this is not an area I have a great deal of expertise in so I’m probably
way off base.
Chris