A single target could be picked for unity build, and in that case extract_objects() should not be allowed. Likewise for the opposite case, where extract_objects() should be allowed if unity build is disabled for a single target. A test that covers that case is added later.pull/10493/head
parent
f3ba24f289
commit
dae986073d
8 changed files with 26 additions and 10 deletions
@ -0,0 +1,4 @@ |
|||||||
|
project('extract nonexisting gen', 'c') |
||||||
|
|
||||||
|
lib1 = library('lib1', 'src1.c', 'src2.c', override_options: ['unity=on']) |
||||||
|
lib2 = library('lib2', objects: lib1.extract_objects('src1.c')) |
@ -0,0 +1,3 @@ |
|||||||
|
int sub_lib_method1() { |
||||||
|
return 1337; |
||||||
|
} |
@ -0,0 +1,3 @@ |
|||||||
|
int sub_lib_method2() { |
||||||
|
return 1337; |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
{ |
||||||
|
"stdout": [ |
||||||
|
{ |
||||||
|
"line": "test cases/failing/126 extract from unity/meson.build:4:0: ERROR: Single object files can not be extracted in Unity builds. You can only extract all the object files for each compiler at once." |
||||||
|
} |
||||||
|
] |
||||||
|
} |
Loading…
Reference in new issue