1# Copyright © 2017 Intel Corporation 2# SPDX-License-Identifier: MIT 3 4opencl_version = '1' 5 6rusticl_ld_args = [] 7rusticl_ld_depends = [] 8 9if with_ld_version_script 10 rusticl_ld_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'rusticl.sym')] 11 rusticl_ld_depends += files('rusticl.sym') 12endif 13 14librusticl = shared_library( 15 'RusticlOpenCL', 16 'rusticl_target.c', 17 gnu_symbol_visibility : 'hidden', 18 include_directories : [ 19 inc_include, 20 inc_src, 21 inc_gallium, 22 inc_gallium_aux, 23 inc_gallium_drivers, 24 inc_gallium_winsys, 25 ], 26 link_whole : librusticl, 27 link_with : [ 28 libgalliumvl_stub, 29 libpipe_loader_static, 30 libswdri, 31 libswkmsdri, 32 libwsw, 33 libws_null, 34 ], 35 dependencies : [ 36 driver_asahi, 37 driver_iris, 38 driver_nouveau, 39 driver_r600, 40 driver_panfrost, 41 driver_radeonsi, 42 driver_swrast, 43 driver_v3d, 44 driver_zink, 45 idep_nir, 46 idep_vtn, 47 idep_mesautil, 48 ], 49 link_args : [ 50 ld_args_build_id, 51 ld_args_gc_sections, 52 ld_args_bsymbolic, 53 rusticl_ld_args, 54 ], 55 link_depends : rusticl_ld_depends, 56 version : '@[email protected]'.format(opencl_version), 57 install : true, 58) 59 60_config = configuration_data() 61_config.set('OPENCL_VERSION', opencl_version) 62configure_file( 63 configuration : _config, 64 input : 'rusticl.icd.in', 65 output : 'rusticl.icd', 66 install : true, 67 install_tag : 'runtime', 68 install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'), 69) 70 71# .so is hardcoded in the icd as well 72devenv.prepend( 73 'OCL_ICD_VENDORS', 74 meson.current_build_dir() / '' 75) 76