From 70265487ec9a4ec3e41aeb1436973d952f621ddc Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Tue, 29 Sep 2020 16:43:35 +0300 Subject: meson.build: add static-libc option Signed-off-by: Tomi Valkeinen --- meson.build | 8 ++++++++ meson_options.txt | 1 + 2 files changed, 9 insertions(+) diff --git a/meson.build b/meson.build index bc5b8bf..cd604af 100644 --- a/meson.build +++ b/meson.build @@ -23,6 +23,14 @@ endif add_project_arguments(cpp_arguments, language : 'cpp') +link_arguments = [] + +if get_option('static-libc') + link_arguments += ['-static-libgcc', '-static-libstdc++'] +endif + +add_global_link_arguments(link_arguments, language : 'cpp') + libfmt_includes = include_directories('ext/fmt/include') libfmt_dep = declare_dependency(include_directories : libfmt_includes, compile_args : '-DFMT_HEADER_ONLY') diff --git a/meson_options.txt b/meson_options.txt index 037d41c..3f18c02 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,4 @@ option('kmscube', type : 'boolean', value : false) option('pykms', type : 'feature', value : 'auto') option('omap', type : 'feature', value : 'auto') +option('static-libc', type : 'boolean', value : false) -- cgit v1.2.3