1bf215546Sopenharmony_ci# Copyright © 2017 Intel Corporation 2bf215546Sopenharmony_ci 3bf215546Sopenharmony_ci# Permission is hereby granted, free of charge, to any person obtaining a copy 4bf215546Sopenharmony_ci# of this software and associated documentation files (the "Software"), to deal 5bf215546Sopenharmony_ci# in the Software without restriction, including without limitation the rights 6bf215546Sopenharmony_ci# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7bf215546Sopenharmony_ci# copies of the Software, and to permit persons to whom the Software is 8bf215546Sopenharmony_ci# furnished to do so, subject to the following conditions: 9bf215546Sopenharmony_ci 10bf215546Sopenharmony_ci# The above copyright notice and this permission notice shall be included in 11bf215546Sopenharmony_ci# all copies or substantial portions of the Software. 12bf215546Sopenharmony_ci 13bf215546Sopenharmony_ci# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14bf215546Sopenharmony_ci# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15bf215546Sopenharmony_ci# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16bf215546Sopenharmony_ci# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17bf215546Sopenharmony_ci# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18bf215546Sopenharmony_ci# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19bf215546Sopenharmony_ci# SOFTWARE. 20bf215546Sopenharmony_ci 21bf215546Sopenharmony_cifiles_addrlib = files( 22bf215546Sopenharmony_ci 'inc/addrinterface.h', 23bf215546Sopenharmony_ci 'inc/addrtypes.h', 24bf215546Sopenharmony_ci 'src/addrinterface.cpp', 25bf215546Sopenharmony_ci 'src/core/addrcommon.h', 26bf215546Sopenharmony_ci 'src/core/addrelemlib.cpp', 27bf215546Sopenharmony_ci 'src/core/addrelemlib.h', 28bf215546Sopenharmony_ci 'src/core/addrlib.cpp', 29bf215546Sopenharmony_ci 'src/core/addrlib.h', 30bf215546Sopenharmony_ci 'src/core/addrlib1.cpp', 31bf215546Sopenharmony_ci 'src/core/addrlib1.h', 32bf215546Sopenharmony_ci 'src/core/addrlib2.cpp', 33bf215546Sopenharmony_ci 'src/core/addrlib2.h', 34bf215546Sopenharmony_ci 'src/core/addrobject.cpp', 35bf215546Sopenharmony_ci 'src/core/addrobject.h', 36bf215546Sopenharmony_ci 'src/core/coord.cpp', 37bf215546Sopenharmony_ci 'src/core/coord.h', 38bf215546Sopenharmony_ci 'src/gfx9/gfx9addrlib.cpp', 39bf215546Sopenharmony_ci 'src/gfx9/gfx9addrlib.h', 40bf215546Sopenharmony_ci 'src/gfx10/gfx10addrlib.cpp', 41bf215546Sopenharmony_ci 'src/gfx10/gfx10addrlib.h', 42bf215546Sopenharmony_ci 'src/gfx10/gfx10SwizzlePattern.h', 43bf215546Sopenharmony_ci 'src/gfx11/gfx11addrlib.cpp', 44bf215546Sopenharmony_ci 'src/gfx11/gfx11addrlib.h', 45bf215546Sopenharmony_ci 'src/gfx11/gfx11SwizzlePattern.h', 46bf215546Sopenharmony_ci 'src/amdgpu_asic_addr.h', 47bf215546Sopenharmony_ci 'src/chip/gfx10/gfx10_gb_reg.h', 48bf215546Sopenharmony_ci 'src/chip/gfx11/gfx11_gb_reg.h', 49bf215546Sopenharmony_ci 'src/chip/gfx9/gfx9_gb_reg.h', 50bf215546Sopenharmony_ci 'src/chip/r800/si_gb_reg.h', 51bf215546Sopenharmony_ci 'src/r800/ciaddrlib.cpp', 52bf215546Sopenharmony_ci 'src/r800/ciaddrlib.h', 53bf215546Sopenharmony_ci 'src/r800/egbaddrlib.cpp', 54bf215546Sopenharmony_ci 'src/r800/egbaddrlib.h', 55bf215546Sopenharmony_ci 'src/r800/siaddrlib.cpp', 56bf215546Sopenharmony_ci 'src/r800/siaddrlib.h', 57bf215546Sopenharmony_ci) 58bf215546Sopenharmony_ci 59bf215546Sopenharmony_ci# Skip the addrlib definition of ADDR_FASTCALL so as not to use regparm. 60bf215546Sopenharmony_cicpp_args_addrlib = ['-DADDR_FASTCALL='] 61bf215546Sopenharmony_ci 62bf215546Sopenharmony_ciif host_machine.endian() == 'little' 63bf215546Sopenharmony_ci cpp_args_addrlib += '-DLITTLEENDIAN_CPU' 64bf215546Sopenharmony_cielse 65bf215546Sopenharmony_ci cpp_args_addrlib += '-DBIGENDIAN_CPU' 66bf215546Sopenharmony_ciendif 67bf215546Sopenharmony_ci 68bf215546Sopenharmony_cicpp_args_addrlib += cpp.get_supported_arguments( 69bf215546Sopenharmony_ci ['-Wno-unused-variable', '-Wno-unused-local-typedefs', 70bf215546Sopenharmony_ci '-Wno-unused-but-set-variable', '-Wno-maybe-uninitialized', 71bf215546Sopenharmony_ci '-Wno-self-assign'] 72bf215546Sopenharmony_ci) 73bf215546Sopenharmony_ci 74bf215546Sopenharmony_cilibamdgpu_addrlib = static_library( 75bf215546Sopenharmony_ci 'addrlib', 76bf215546Sopenharmony_ci files_addrlib, 77bf215546Sopenharmony_ci include_directories : [ 78bf215546Sopenharmony_ci include_directories( 79bf215546Sopenharmony_ci 'inc', 'src', 'src/core', 'src/chip/gfx9', 'src/chip/r800', 80bf215546Sopenharmony_ci 'src/chip/gfx10', 'src/chip/gfx11', 81bf215546Sopenharmony_ci ), 82bf215546Sopenharmony_ci inc_amd_common, inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, 83bf215546Sopenharmony_ci ], 84bf215546Sopenharmony_ci cpp_args : cpp_args_addrlib, 85bf215546Sopenharmony_ci gnu_symbol_visibility : 'hidden', 86bf215546Sopenharmony_ci) 87