diff options
| author | L. E. Segovia <amy@amyspark.me> | 2025-08-03 22:26:07 -0300 |
|---|---|---|
| committer | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-09-06 16:58:56 +0300 |
| commit | c3ea8d5aa1b48fbc4137ef783c567a32cd596993 (patch) | |
| tree | a1c729133a5e92ad516623192fd48c742db31fa2 /mesonbuild/backend | |
| parent | 4b7a23c047ef5139f84cf96da37d132fe5fd84bc (diff) | |
| download | meson-c3ea8d5aa1b48fbc4137ef783c567a32cd596993.tar.gz | |
compilers: Enable out-of-the-box MSVC compatibility with ccache
ccache has been for a long time compatible with MSVC (since 4.6)
but when using debug mode, the /Z7 flag must be passed instead of
/Zi.
See https://ccache.dev/releasenotes.html#_ccache_4_6
Diffstat (limited to 'mesonbuild/backend')
| -rw-r--r-- | mesonbuild/backend/vs2010backend.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index deb3dfb23..8804b8daa 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -865,6 +865,8 @@ class Vs2010Backend(backends.Backend): # FIXME add args as needed. if entry[1:].startswith('fsanitize'): return True + if entry[1:] in frozenset(['Zi', 'Z7', 'ZI']): + return True return entry[1:].startswith('M') def add_additional_options(self, lang, parent_node, file_args): @@ -1348,11 +1350,11 @@ class Vs2010Backend(backends.Backend): if '/fsanitize=address' in build_args: ET.SubElement(type_config, 'EnableASAN').text = 'true' # Debug format - if '/ZI' in build_args: + if '/ZI' in build_args or '-ZI' in build_args: ET.SubElement(clconf, 'DebugInformationFormat').text = 'EditAndContinue' - elif '/Zi' in build_args: + elif '/Zi' in build_args or '-Zi' in build_args: ET.SubElement(clconf, 'DebugInformationFormat').text = 'ProgramDatabase' - elif '/Z7' in build_args: + elif '/Z7' in build_args or '-Z7' in build_args: ET.SubElement(clconf, 'DebugInformationFormat').text = 'OldStyle' else: ET.SubElement(clconf, 'DebugInformationFormat').text = 'None' |
