1# Copyright © 2018 Valve Corporation 2# SPDX-License-Identifier: MIT 3 4aco_depends = files('aco_opcodes.py') 5 6aco_opcodes_h = custom_target( 7 'aco_opcodes.h', 8 input : 'aco_opcodes_h.py', 9 output : 'aco_opcodes.h', 10 command : [prog_python, '@INPUT@'], 11 capture : true, 12 depend_files : aco_depends, 13) 14 15aco_opcodes_c = custom_target( 16 'aco_opcodes.cpp', 17 input : 'aco_opcodes_cpp.py', 18 output : 'aco_opcodes.cpp', 19 command : [prog_python, '@INPUT@'], 20 capture : true, 21 depend_files : aco_depends, 22) 23 24aco_builder_h = custom_target( 25 'aco_builder.h', 26 input : 'aco_builder_h.py', 27 output : 'aco_builder.h', 28 command : [prog_python, '@INPUT@'], 29 capture : true, 30 depend_files : aco_depends, 31) 32 33libaco_files = files( 34 'aco_dead_code_analysis.cpp', 35 'aco_dominance.cpp', 36 'aco_instruction_selection.cpp', 37 'aco_instruction_selection.h', 38 'aco_instruction_selection_setup.cpp', 39 'aco_interface.cpp', 40 'aco_interface.h', 41 'aco_ir.cpp', 42 'aco_ir.h', 43 'aco_assembler.cpp', 44 'aco_form_hard_clauses.cpp', 45 'aco_insert_delay_alu.cpp', 46 'aco_insert_exec_mask.cpp', 47 'aco_insert_NOPs.cpp', 48 'aco_insert_waitcnt.cpp', 49 'aco_jump_threading.cpp', 50 'aco_reduce_assign.cpp', 51 'aco_register_allocation.cpp', 52 'aco_live_var_analysis.cpp', 53 'aco_lower_branches.cpp', 54 'aco_lower_phis.cpp', 55 'aco_lower_subdword.cpp', 56 'aco_lower_to_cssa.cpp', 57 'aco_lower_to_hw_instr.cpp', 58 'aco_optimizer.cpp', 59 'aco_optimizer_postRA.cpp', 60 'aco_opt_value_numbering.cpp', 61 'aco_print_asm.cpp', 62 'aco_print_ir.cpp', 63 'aco_reindex_ssa.cpp', 64 'aco_repair_ssa.cpp', 65 'aco_scheduler.cpp', 66 'aco_scheduler_ilp.cpp', 67 'aco_spill.cpp', 68 'aco_ssa_elimination.cpp', 69 'aco_statistics.cpp', 70 'aco_util.h', 71 'aco_validate.cpp', 72) 73 74cpp_args_aco = cpp.get_supported_arguments(['-fno-exceptions', '-fno-rtti', '-Wimplicit-fallthrough', '-Wshadow']) 75 76_libaco = static_library( 77 'aco', 78 [libaco_files, aco_opcodes_c, aco_opcodes_h, aco_builder_h], 79 include_directories : [ 80 inc_include, inc_src, inc_amd, inc_amd_common, 81 ], 82 dependencies : [ 83 dep_llvm, dep_thread, dep_valgrind, idep_nir_headers, idep_amdgfxregs_h, idep_mesautil, 84 ], 85 gnu_symbol_visibility : 'hidden', 86 build_by_default : true, 87 cpp_args : [cpp_args_aco, cpp_msvc_compat_args], 88) 89 90# Also link with aco 91idep_aco = declare_dependency( 92 include_directories : include_directories('.'), 93 link_with : _libaco, 94 sources : [aco_opcodes_h, aco_builder_h], 95) 96