xref: /aosp_15_r20/external/mesa3d/src/compiler/meson.build (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1# Copyright © 2017 Intel Corporation
2# SPDX-License-Identifier: MIT
3
4inc_compiler = include_directories('.')
5inc_glsl = include_directories('glsl')
6inc_spirv = include_directories('spirv')
7
8builtin_types_h = custom_target(
9  'builtin_types.h',
10  input : 'builtin_types_h.py',
11  output : 'builtin_types.h',
12  command : [prog_python, '@INPUT@', '@OUTPUT@'],
13  depend_files : files('builtin_types.py'),
14  depends : u_format_gen_h,
15)
16
17builtin_types_c = custom_target(
18  'builtin_types.c',
19  input : 'builtin_types_c.py',
20  output : 'builtin_types.c',
21  command : [prog_python, '@INPUT@', '@OUTPUT@'],
22  depend_files : files('builtin_types.py'),
23)
24
25float64_glsl_file = files('glsl/float64.glsl')
26
27astc_decoder_glsl_file = files('glsl/astc_decoder.glsl')
28
29files_libcompiler = files(
30  'glsl_types.c',
31  'glsl_types.h',
32  'shader_enums.c',
33  'shader_enums.h',
34  'shader_info.h',
35)
36
37ir_expression_operation_h = custom_target(
38  'ir_expression_operation.h',
39  input : 'glsl/ir_expression_operation.py',
40  output : 'ir_expression_operation.h',
41  command : [prog_python, '@INPUT@', 'enum'],
42  capture : true,
43)
44
45libcompiler = static_library(
46  'compiler',
47  [files_libcompiler, ir_expression_operation_h, builtin_types_h, builtin_types_c],
48  include_directories : [inc_compiler, inc_include, inc_src],
49  c_args : [c_msvc_compat_args, no_override_init_args],
50  cpp_args : [cpp_msvc_compat_args],
51  gnu_symbol_visibility : 'hidden',
52  dependencies : [dep_valgrind],
53  build_by_default : false,
54)
55
56idep_compiler = declare_dependency(
57  sources : [ir_expression_operation_h, builtin_types_h],
58  include_directories : inc_compiler,
59  link_with : libcompiler,
60)
61
62subdir('nir')
63
64subdir('spirv')
65
66if with_clc
67  subdir('clc')
68endif
69if with_gallium
70  subdir('glsl')
71endif
72subdir('isaspec')
73
74if with_nouveau_vk
75  subdir('rust')
76endif
77