ci: Specify -Wno-overlength-strings on macOS

This disables the following warning, which was causing CI failures on
macOS when building the libpcre2 subproject:
```
../subprojects/pcre2-10.40/src/pcre2_error.c:66:3: error: string literal of length 4380 exceeds maximum length 4095 that ISO C99 compilers are required to support [-Werror,-Woverlength-strings]
```

We don’t want to explicitly rely on using overlength strings in GLib,
which is why this change is a `CFLAGS` in the CI configuration, rather
than setting a project-level argument in `meson.build`.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2022-07-12 14:16:23 +01:00
parent e19df710d2
commit e6af2d3662

View File

@ -437,6 +437,10 @@ macos:
needs: [] needs: []
variables: variables:
GIT_SUBMODULE_STRATEGY: normal GIT_SUBMODULE_STRATEGY: normal
# libpcre2 gets built as a subproject, but the default Clang options on
# macOS limit string lengths to 4095B — pcre2_error.c has a string of length
# 4380B
CFLAGS: '-Wno-overlength-strings'
before_script: before_script:
- bash .gitlab-ci/show-execution-environment.sh - bash .gitlab-ci/show-execution-environment.sh
- pip3 install --user meson==0.60.1 - pip3 install --user meson==0.60.1