1# Copyright © 2018 Valve Corporation 2 3# Permission is hereby granted, free of charge, to any person obtaining a copy 4# of this software and associated documentation files (the "Software"), to deal 5# in the Software without restriction, including without limitation the rights 6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7# copies of the Software, and to permit persons to whom the Software is 8# furnished to do so, subject to the following conditions: 9 10# The above copyright notice and this permission notice shall be included in 11# all copies or substantial portions of the Software. 12 13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19# SOFTWARE. 20 21aco_depends = files('aco_opcodes.py') 22 23aco_opcodes_h = custom_target( 24 'aco_opcodes.h', 25 input : 'aco_opcodes_h.py', 26 output : 'aco_opcodes.h', 27 command : [prog_python, '@INPUT@'], 28 capture : true, 29 depend_files : aco_depends, 30) 31 32aco_opcodes_c = custom_target( 33 'aco_opcodes.cpp', 34 input : 'aco_opcodes_cpp.py', 35 output : 'aco_opcodes.cpp', 36 command : [prog_python, '@INPUT@'], 37 capture : true, 38 depend_files : aco_depends, 39) 40 41aco_builder_h = custom_target( 42 'aco_builder.h', 43 input : 'aco_builder_h.py', 44 output : 'aco_builder.h', 45 command : [prog_python, '@INPUT@'], 46 capture : true, 47 depend_files : aco_depends, 48) 49 50libaco_files = files( 51 'aco_dead_code_analysis.cpp', 52 'aco_dominance.cpp', 53 'aco_instruction_selection.cpp', 54 'aco_instruction_selection.h', 55 'aco_instruction_selection_setup.cpp', 56 'aco_interface.cpp', 57 'aco_interface.h', 58 'aco_ir.cpp', 59 'aco_ir.h', 60 'aco_assembler.cpp', 61 'aco_form_hard_clauses.cpp', 62 'aco_insert_exec_mask.cpp', 63 'aco_insert_NOPs.cpp', 64 'aco_insert_waitcnt.cpp', 65 'aco_reduce_assign.cpp', 66 'aco_register_allocation.cpp', 67 'aco_live_var_analysis.cpp', 68 'aco_lower_phis.cpp', 69 'aco_lower_to_cssa.cpp', 70 'aco_lower_to_hw_instr.cpp', 71 'aco_optimizer.cpp', 72 'aco_optimizer_postRA.cpp', 73 'aco_opt_value_numbering.cpp', 74 'aco_print_asm.cpp', 75 'aco_print_ir.cpp', 76 'aco_reindex_ssa.cpp', 77 'aco_scheduler.cpp', 78 'aco_spill.cpp', 79 'aco_ssa_elimination.cpp', 80 'aco_statistics.cpp', 81 'aco_util.h', 82 'aco_validate.cpp', 83) 84 85cpp_args_aco = cpp.get_supported_arguments(['-fno-exceptions', '-fno-rtti', '-Wimplicit-fallthrough', '-Wshadow', '-DNOMINMAX']) 86 87_libaco = static_library( 88 'aco', 89 [libaco_files, aco_opcodes_c, aco_opcodes_h, aco_builder_h], 90 include_directories : [ 91 inc_include, inc_src, inc_compiler, inc_amd, inc_amd_common, 92 ], 93 dependencies : [ 94 dep_llvm, dep_thread, dep_valgrind, idep_nir_headers, idep_amdgfxregs_h, idep_mesautil, 95 ], 96 gnu_symbol_visibility : 'hidden', 97 build_by_default : true, 98 cpp_args : [cpp_args_aco, cpp_msvc_compat_args], 99) 100 101# Also link with aco 102idep_aco = declare_dependency( 103 include_directories : include_directories('.'), 104 link_with : _libaco, 105) 106