From 0f4255548481b3d628418b27fa3856d45cdecfd9 Mon Sep 17 00:00:00 2001 From: Bruno Date: Thu, 13 Jun 2024 22:25:29 -0300 Subject: [PATCH] gitlab-ci, meson: Enable colored Clang output This makes easier to spot warnings. --- .gitlab-ci.yml | 2 ++ meson.build | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 11c342c318..69eb2fae6e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -102,6 +102,8 @@ variables: # CI-wide Debian variables ARTIFACTS_SUFFIX: "-x64" GIMP_PREFIX: "${CI_PROJECT_DIR}/_install${ARTIFACTS_SUFFIX}" + # Enable colorful output when supported (e.g. ninja, cppcheck) + CLICOLOR_FORCE: "1" stages: diff --git a/meson.build b/meson.build index a6214f9f61..5919ffcd58 100644 --- a/meson.build +++ b/meson.build @@ -289,10 +289,14 @@ if platform_windows and cc.get_id() == 'gcc' compiler_args += msvc_compat_args endif -# Optimize DWARF symbols to Dr. Mingw -# https://github.com/jrfonseca/drmingw/issues/42 + if platform_windows and cc.get_id() == 'clang' + # Optimize DWARF symbols to Dr. Mingw + # https://github.com/jrfonseca/drmingw/issues/42 compiler_args += '-gdwarf-aranges' + # Workaround to get colored output + # https://github.com/msys2/MINGW-packages/issues/2988 + compiler_args += '-fansi-escape-codes' endif # Generate .pdb (CodeView) debug symbols (makes possible to debug with DIA SDK)