[glib/wip/pwithnall/wpointer-sign: 1/2] ci: Specify -Wno-overlength-strings on macOS




commit e6af2d3662b2d45c357b30f5e926f4cf12517863
Author: Philip Withnall <pwithnall endlessos org>
Date:   Tue Jul 12 14:16:23 2022 +0100

    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>

 .gitlab-ci.yml | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index aeeabc36eb..da11515bb9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -437,6 +437,10 @@ macos:
   needs: []
   variables:
     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:
     - bash .gitlab-ci/show-execution-environment.sh
     - pip3 install --user meson==0.60.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]