| 1 |
# Copyright 2025 Valve Corporation |
| 2 |
# Copyright 2020-2021 Collabora |
| 3 |
# SPDX-License-Identifier: MIT |
| 4 |
|
| 5 |
agx2_disasm_c = custom_target( |
| 6 |
input : ['gen-disasm.py', 'AGX2.xml'], |
| 7 |
output : 'agx2_disasm.c', |
| 8 |
command : [prog_python, '@INPUT@'], |
| 9 |
capture : true, |
| 10 |
depend_files : files('isa.py'), |
| 11 |
) |
| 12 |
|
| 13 |
libagx2_disasm = static_library( |
| 14 |
'agx2_disasm', |
| 15 |
agx2_disasm_c, |
| 16 |
include_directories : [inc_include, inc_src], |
| 17 |
c_args : [no_override_init_args], |
| 18 |
gnu_symbol_visibility : 'hidden', |
| 19 |
build_by_default : true, |
| 20 |
) |
| 21 |
|
| 22 |
if with_tests |
| 23 |
test( |
| 24 |
'agx2_disasm', |
| 25 |
executable( |
| 26 |
'agx2_disasm_test', |
| 27 |
files('test/test-disassembler.c'), |
| 28 |
c_args : [c_msvc_compat_args, no_override_init_args], |
| 29 |
gnu_symbol_visibility : 'hidden', |
| 30 |
include_directories : [inc_include, inc_src], |
| 31 |
link_with : [libagx2_disasm], |
| 32 |
), |
| 33 |
suite : ['asahi'], |
| 34 |
args : files('test/cases.txt'), |
| 35 |
) |
| 36 |
|
| 37 |
test( |
| 38 |
'agx2_python_disasm', |
| 39 |
prog_python, |
| 40 |
args : files('test-disasm.py', 'test/cases.txt'), |
| 41 |
suite : ['asahi'] |
| 42 |
) |
| 43 |
endif |