diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-08-23 14:45:54 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-08-25 16:49:40 +0300 |
| commit | 0528ef93e57faa0ad9889b4575af4c00ced7bd7e (patch) | |
| tree | 752ab1d2f026e7e30f88f019836ddd700bdc8174 /test cases/common | |
| parent | 85f16a129bc5f6b2111187dd302405dc9554d817 (diff) | |
| download | meson-0528ef93e57faa0ad9889b4575af4c00ced7bd7e.tar.gz | |
coredata: check for per-subproject compiler and linker arguments
The compiler and linker argument options are special and are only
added when the compiler is first discovered. Thus any project-specific
values in a child project will remain sitting in pending_options
after initialize_from_subproject_call; coredata needs to inform
the option store that they now exist.
Fixes: #14939
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'test cases/common')
| -rw-r--r-- | test cases/common/43 subproject options/meson.build | 2 | ||||
| -rw-r--r-- | test cases/common/43 subproject options/subprojects/subproject/meson.build | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/test cases/common/43 subproject options/meson.build b/test cases/common/43 subproject options/meson.build index a90527294..d274fbfcd 100644 --- a/test cases/common/43 subproject options/meson.build +++ b/test cases/common/43 subproject options/meson.build @@ -1,4 +1,4 @@ -project('suboptions') +project('suboptions', default_options: {'c_args': ['-O']}) subproject('subproject') diff --git a/test cases/common/43 subproject options/subprojects/subproject/meson.build b/test cases/common/43 subproject options/subprojects/subproject/meson.build index 548d7b4e3..24a9dc0e7 100644 --- a/test cases/common/43 subproject options/subprojects/subproject/meson.build +++ b/test cases/common/43 subproject options/subprojects/subproject/meson.build @@ -1,7 +1,11 @@ project('subproject', 'c', - default_options: {'c_std': 'c11'}) + default_options: {'c_std': 'c11', 'c_args': ['-O2']}) assert(get_option('c_std') == 'c11') +# could be -O2 as above, or for some cross compilation tests in +# CI it could come from the machine file. but it's certainly +# not the value in the top-level project. +assert(get_option('c_args') != ['-O']) if get_option('opt') error('option set when it should be unset.') |
