Otherwise if the list of sources changes on reconfigure after building, the static library will contain both the old and new objects. Closes https://github.com/mesonbuild/meson/issues/1355pull/1356/head
parent
217eae4011
commit
a14eba27a9
5 changed files with 58 additions and 4 deletions
@ -0,0 +1,3 @@ |
||||
int libfunc2() { |
||||
return 4; |
||||
} |
@ -1,3 +1,4 @@ |
||||
project('static library test', 'c') |
||||
lib = static_library('mylib', 'libfile.c', |
||||
|
||||
lib = static_library('mylib', get_option('source'), |
||||
link_args : '-THISMUSTNOBEUSED') # Static linker needs to ignore all link args. |
||||
|
@ -0,0 +1 @@ |
||||
option('source', type : 'combo', choices : ['libfile.c', 'libfile2.c'], value : 'libfile.c') |
Loading…
Reference in new issue