Merge pull request #8900 from bonzini/extract-objects-docs
extract_objects: fixes, tests and documentation for using the result in a custom_targetpull/8912/head
commit
7588dbc587
5 changed files with 44 additions and 6 deletions
@ -0,0 +1,21 @@ |
||||
#! /usr/bin/env python3 |
||||
|
||||
import json |
||||
import sys |
||||
import os |
||||
|
||||
cc = None |
||||
output = None |
||||
|
||||
# Only the ninja backend produces compile_commands.json |
||||
if sys.argv[1] == 'ninja': |
||||
with open('compile_commands.json', 'r') as f: |
||||
cc = json.load(f) |
||||
output = set((x['output'] for x in cc)) |
||||
|
||||
for obj in sys.argv[2:]: |
||||
if not os.path.exists(obj): |
||||
sys.exit(1) |
||||
if sys.argv[1] == 'ninja' and obj not in output: |
||||
sys.exit(1) |
||||
print('Verified', obj) |
@ -0,0 +1 @@ |
||||
/* Check that extract_all_objects works with headers. */ |
Loading…
Reference in new issue