From 14faeb50c96acde041cc1f6b182fdab9b40c5315 Mon Sep 17 00:00:00 2001 From: Fred Morcos Date: Fri, 8 Sep 2023 11:16:27 +0200 Subject: [PATCH] Meson: Get rid of the meson modules archive --- meson-archive/bison/meson.build | 11 ------- meson-archive/code-coverage/meson.build | 18 ------------ meson-archive/flex/meson.build | 11 ------- meson-archive/lto/meson.build | 35 ----------------------- meson-archive/meson_options.txt | 10 ------- meson-archive/pie/meson.build | 38 ------------------------- meson-archive/python-venv/meson.build | 29 ------------------- meson-archive/python/meson.build | 10 ------- meson-archive/ragel/meson.build | 11 ------- 9 files changed, 173 deletions(-) delete mode 100644 meson-archive/bison/meson.build delete mode 100644 meson-archive/code-coverage/meson.build delete mode 100644 meson-archive/flex/meson.build delete mode 100644 meson-archive/lto/meson.build delete mode 100644 meson-archive/meson_options.txt delete mode 100644 meson-archive/pie/meson.build delete mode 100644 meson-archive/python-venv/meson.build delete mode 100644 meson-archive/python/meson.build delete mode 100644 meson-archive/ragel/meson.build diff --git a/meson-archive/bison/meson.build b/meson-archive/bison/meson.build deleted file mode 100644 index 8ff17f1b50..0000000000 --- a/meson-archive/bison/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -bison = find_program('bison', required: true) - -summary('Bison', bison.found(), bool_yn: true, section: 'Programs') -summary('Bison Path', bison.full_path(), section: 'Programs') -summary('Bison Version', bison.version(), section: 'Programs') - -bison_generator = generator( - bison, - output: '@BASENAME@.cc', - arguments: ['-d', '--verbose', '--debug', '--output=@OUTPUT@', '@INPUT@'], -) diff --git a/meson-archive/code-coverage/meson.build b/meson-archive/code-coverage/meson.build deleted file mode 100644 index ce5df9f6b1..0000000000 --- a/meson-archive/code-coverage/meson.build +++ /dev/null @@ -1,18 +0,0 @@ -# Code coverage - -code_coverage = get_option('code-coverage') - -if code_coverage - args = ['-U_FORTIFY_SOURCE', '-g', '-O0', '-fprofile-arcs', '-ftest-coverage'] - - foreach arg: args - if not cxx.has_argument(arg) - error('Compiler does not support ' + arg + ', which is needed for code coverage') - break - endif - endforeach - - add_project_arguments(args, language: ['c', 'cpp']) -endif - -summary('Code Coverage', code_coverage, bool_yn: true, section: 'Configuration') diff --git a/meson-archive/flex/meson.build b/meson-archive/flex/meson.build deleted file mode 100644 index 1ef5905e3e..0000000000 --- a/meson-archive/flex/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -flex = find_program('flex', required: true) - -summary('Flex', flex.found(), bool_yn: true, section: 'Programs') -summary('Flex Path', flex.full_path(), section: 'Programs') -summary('Flex Version', flex.version(), section: 'Programs') - -flex_generator = generator( - flex, - output: '@BASENAME@.c', - arguments: ['--case-insensitive', '--outfile=@OUTPUT@', '@INPUT@'], -) diff --git a/meson-archive/lto/meson.build b/meson-archive/lto/meson.build deleted file mode 100644 index 5c33f41430..0000000000 --- a/meson-archive/lto/meson.build +++ /dev/null @@ -1,35 +0,0 @@ -# Link-time Optimization - -opt_lto = get_option('lto') - -if opt_lto == 'thin' - compiler_opt = '-flto=thin' - if cxx.has_argument(compiler_opt) - add_project_arguments(compiler_opt, language: ['c', 'cpp']) - add_project_link_arguments(compiler_opt, language: ['c', 'cpp']) - else - opt_lto = 'auto' - endif -endif - -if opt_lto == 'auto' - compiler_opt = '-flto=auto' - if cxx.has_argument(compiler_opt) - add_project_arguments(compiler_opt, language: ['c', 'cpp']) - add_project_link_arguments(compiler_opt, language: ['c', 'cpp']) - else - opt_lto = 'yes' - endif -endif - -if opt_lto == 'yes' - compiler_opt = '-flto' - if cxx.has_argument(compiler_opt) - add_project_arguments(compiler_opt, language: ['c', 'cpp']) - add_project_link_arguments(compiler_opt, language: ['c', 'cpp']) - else - error('LTO was requested but is not supported') - endif -endif - -summary('LTO', opt_lto, section: 'Configuration') diff --git a/meson-archive/meson_options.txt b/meson-archive/meson_options.txt deleted file mode 100644 index a43cdd3e10..0000000000 --- a/meson-archive/meson_options.txt +++ /dev/null @@ -1,10 +0,0 @@ -# TODO Use meson's -Db_coverage option? -# option('code-coverage', type: 'boolean', value: false, description: 'Enable code coverage') -# TODO Use meson's -Db_sanitize option? -# option('sanitizer-address', type: 'boolean', value: false, description: 'Enable the Address Sanitizer') -# option('sanitizer-memory', type: 'boolean', value: false, description: 'Enable the Memory Sanitizer') -# option('sanitizer-thread', type: 'boolean', value: false, description: 'Enable the Thread Sanitizer') -# option('sanitizer-leak', type: 'boolean', value: false, description: 'Enable the Leak Sanitizer') -# option('sanitizer-undefined', type: 'boolean', value: false, description: 'Enable the Undefined Behavior Sanitizer') -# TODO Use meson's -Db_lto* options? -# option('lto', type: 'combo', choices: ['yes', 'no', 'thin', 'auto'], value: 'no', description: 'Enable link-time optimization') diff --git a/meson-archive/pie/meson.build b/meson-archive/pie/meson.build deleted file mode 100644 index db035cbbc6..0000000000 --- a/meson-archive/pie/meson.build +++ /dev/null @@ -1,38 +0,0 @@ -# PIE -# Inputs: hardening_features conf - -prog = ''' -#include -__thread unsigned int t_id; - -int main() { - t_id = 1; - return 0; -} -''' - -found_variant = false -if system == 'windows' and system == 'cygwin' - # All code is position independent on Win32 targets. - found_variant = true -else - pie_variants = [ - [['-fPIE', '-DPIE'], ['-pie']], - [['-fPIE', '-DPIE'], ['-Wl,-pie']], - ] - foreach variant: pie_variants - cflags = variant[0] - ldflags = variant[1] - - if cxx.links(prog, args: cflags + ldflags, name: 'compiler can build Position Independent Executables') - add_project_arguments(cflags, language: ['c', 'cpp']) - add_project_link_arguments(ldflags, language: ['c', 'cpp']) - found_variant = true - break - endif - endforeach -endif - -hardening_features += [[found_variant, 'Building position independent executables (PIEs)']] -conf.set10('PIE', found_variant, description: 'Whether we enable building a Position Independent Executable (PIE)') -summary('PIE', found_variant, bool_yn: true, section: 'Hardening') diff --git a/meson-archive/python-venv/meson.build b/meson-archive/python-venv/meson.build deleted file mode 100644 index be4538e7d9..0000000000 --- a/meson-archive/python-venv/meson.build +++ /dev/null @@ -1,29 +0,0 @@ -python_have_venv = false - -dep_python_prog = dependency('python3', version: '>= 3.6', required: false) -if not dep_python_prog.found() - warning('Python3 dependency not found') - summary('Python', dep_python_prog.found(), bool_yn: true, section: 'Python') - subdir_done() -endif - -summary('Python', dep_python_prog.found(), bool_yn: true, section: 'Python') -summary('Implementation', dep_python_prog.name(), section: 'Python') -summary('Version', dep_python_prog.version(), section: 'Python') - -python_prog_name = 'python' + dep_python_prog.version() -python_prog = find_program(python_prog_name, required: false) -if not python_prog.found() - warning(python_prog_name + ' program not found') - subdir_done() -endif - -python_prog_res = run_command(python_prog, '-c', '"import venv"', check: false) -if python_prog_res.returncode() != 0 - warning(python_prog_name + ' venv module not found') - summary('Python venv', false, bool_yn: true, section: 'Python') - subdir_done() -endif - -python_have_venv = true -summary('Have venv', python_have_venv, bool_yn: true, section: 'Python') diff --git a/meson-archive/python/meson.build b/meson-archive/python/meson.build deleted file mode 100644 index ae1f72aa24..0000000000 --- a/meson-archive/python/meson.build +++ /dev/null @@ -1,10 +0,0 @@ -py = import('python') -python_prog = py.find_installation( - 'python3', - modules: from_git ? ['yaml'] : [], - required: from_git, -) - -summary('Python', python_prog.found(), bool_yn: true, section: 'Python') -summary('Path', python_prog.full_path(), section: 'Python') -summary('Version', python_prog.version(), section: 'Python') diff --git a/meson-archive/ragel/meson.build b/meson-archive/ragel/meson.build deleted file mode 100644 index d77aa37e21..0000000000 --- a/meson-archive/ragel/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -ragel = find_program('ragel', required: false) - -summary('Ragel', ragel.found(), bool_yn: ragel.found(), section: 'Programs') -summary('Ragel Path', ragel.full_path(), section: 'Programs') -summary('Ragel Version', ragel.version(), section: 'Programs') - -ragel_generator = generator( - ragel, - output: '@BASENAME@.cc', - arguments: ['@INPUT@', '-o', '@OUTPUT@'], -) -- 2.47.2