parent
1cb6177f03
commit
f431cff809
7 changed files with 49 additions and 7 deletions
@ -0,0 +1,13 @@ |
||||
#!/usr/bin/env python3 |
||||
|
||||
import sys, os |
||||
|
||||
if __name__ == '__main__': |
||||
if len(sys.argv) != 3: |
||||
print(sys.argv[0], 'object', 'output') |
||||
sys.exit(1) |
||||
elif os.path.exists(sys.argv[1]): |
||||
with open(sys.argv[2], 'wb') as out: |
||||
pass |
||||
else: |
||||
sys.exit(1) |
@ -0,0 +1 @@ |
||||
objlib = static_library('object', 'source.c', override_options : ['unity=off']) |
@ -0,0 +1,3 @@ |
||||
int func1_in_obj() { |
||||
return 0; |
||||
} |
@ -0,0 +1,13 @@ |
||||
project('custom target input extracted objects', 'c') |
||||
|
||||
checker = find_program('check_object.py') |
||||
|
||||
cc = meson.get_compiler('c').cmd_array().get(-1) |
||||
|
||||
subdir('libdir') |
||||
|
||||
custom_target('check', |
||||
input: objlib.extract_objects('source.c'), |
||||
output: 'objcheck', |
||||
command: [checker, '@INPUT@', '@OUTPUT@'], |
||||
build_by_default: true) |
Loading…
Reference in new issue