Merge pull request #39 from obbardc/wip/obbardc/build-dynamicallly-linked-bins

meson: add option to build debugcc as a dynamically linked binary
This commit is contained in:
Konrad Dybcio
2025-12-05 13:06:18 +01:00
committed by GitHub
2 changed files with 11 additions and 1 deletions

View File

@@ -59,7 +59,12 @@ debugcc_srcs += configure_file(
output: 'platforms.c',
configuration: platforms)
debugcc_link_args = []
if not get_option('dynamic-linking')
debugcc_link_args += ['-static', '-static-libgcc']
endif
executable('debugcc',
debugcc_srcs,
link_args: ['-static','-static-libgcc'],
link_args: debugcc_link_args,
install: true)

5
meson_options.txt Normal file
View File

@@ -0,0 +1,5 @@
option('dynamic-linking',
type: 'boolean',
value: false,
description: 'Build debugcc as a dynamically linked binary instead of static',
)