meson: simplify `-gsplit-dwarf` compiler argument check

Fixes: 44b080af07 ("meson: implement split-debug")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28898>
This commit is contained in:
Eric Engestrom 2024-04-24 10:10:43 +02:00 committed by Marge Bot
parent dd3ee08b05
commit 11b060f41a
1 changed files with 1 additions and 6 deletions

View File

@ -962,12 +962,7 @@ endif
pre_args += '-DMESA_DEBUG=' + (with_mesa_debug ? '1' : '0')
with_split_debug = get_option('split-debug') \
.disable_if(not cc.compiles('''#include<stdio.h>
int main() {
printf("\n");
};''',
args : '-gsplit-dwarf',
name : 'split-dwarf support'),
.disable_if(not cc.has_argument('-gsplit-dwarf'),
error_message : 'split-debug requires compiler -gsplit-dwarf support') \
.disable_if(not cc.has_link_argument('-Wl,--gdb-index'),
error_message : 'split-debug requires the linker argument -Wl,--gdb-index')