mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-24 04:08:10 +02:00
radv: validate drirc option names at compile time
This would prevent any typos or if something is backported incorrectly in the future. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41700>
This commit is contained in:
parent
ccb669a05f
commit
07754c960a
2 changed files with 9 additions and 1 deletions
|
|
@ -38,8 +38,12 @@ radv_drirc = custom_target(
|
|||
'--import-path', join_paths(dir_source_root, 'src/util'),
|
||||
'--drirc-src', '@OUTPUT0@',
|
||||
'--drirc-hdr', '@OUTPUT1@',
|
||||
'--validate', join_paths(dir_source_root, 'src/util/00-radv-defaults.conf'),
|
||||
],
|
||||
depend_files : files(join_paths(dir_source_root, 'src/util/drirc_gen.py')),
|
||||
depend_files : files(
|
||||
join_paths(dir_source_root, 'src/util/drirc_gen.py'),
|
||||
join_paths(dir_source_root, 'src/util/00-radv-defaults.conf'),
|
||||
),
|
||||
)
|
||||
|
||||
libradv_files = files(
|
||||
|
|
|
|||
|
|
@ -183,9 +183,13 @@ def main():
|
|||
parser.add_argument('-p', '--import-path', required=True)
|
||||
parser.add_argument('--drirc-src', required=True)
|
||||
parser.add_argument('--drirc-hdr', required=True)
|
||||
parser.add_argument('--validate', required=True)
|
||||
args = parser.parse_args()
|
||||
sys.path.insert(0, args.import_path)
|
||||
|
||||
from drirc_gen import drirc_validate
|
||||
drirc_validate([args.validate], declare_options())
|
||||
|
||||
from drirc_gen import drirc_generate
|
||||
drirc_generate(args.drirc_src, args.drirc_hdr, "radv", declare_options())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue