When a subproject is disabled on the initial configuration we should not add it into self.coredata.initialized_subprojects because that will prevent calling self.coredata.init_builtins() on a reconfigure if the subproject gets enabled. Fixes: #10225.pull/10494/head
parent
e559ea0b7c
commit
d85a9733e6
6 changed files with 26 additions and 2 deletions
@ -0,0 +1,3 @@ |
||||
project('New subproject on reconfigure') |
||||
|
||||
subproject('foo', required: get_option('foo')) |
@ -0,0 +1 @@ |
||||
option('foo', type: 'feature', value: 'disabled') |
@ -0,0 +1,2 @@ |
||||
void foo(void); |
||||
void foo(void) {} |
@ -0,0 +1,8 @@ |
||||
project('foo', 'c') |
||||
|
||||
# Ensure that builtin options have been initialised. |
||||
assert(get_option('default_library') == 'shared') |
||||
|
||||
# This uses default_library option internally and used to cause a crash: |
||||
# https://github.com/mesonbuild/meson/issues/10225. |
||||
library('foo', 'foo.c') |
Loading…
Reference in new issue