mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-aeba937762a0238ef22abb38adc31ce3aad4ab83 / contrib / compiler_glsl.sh
blob36f6816e2023f7edc355afa9af68c87b4e4bc879
1 printf "\tbuilding glsl compiler sub-components-->\n"
2 #===============================================================================
3 mkdir -p $build_dir/src/compiler/glsl/glcpp
4 #-------------------------------------------------------------------------------
5 libglcpp_c_pathnames="\
6 $src_dir/src/compiler/glsl/glcpp/pp.c \
7 $src_dir/src/compiler/glsl/glcpp/pp_standalone_scaffolding.c \
8 $build_dir/src/compiler/glsl/glcpp/glcpp-lex.c \
9 $build_dir/src/compiler/glsl/glcpp/glcpp-parse.c \
11 #-------------------------------------------------------------------------------
12 for src_pathname in $libglcpp_c_pathnames
14 cpp_filename=$(basename $src_pathname .c).cpp.c
15 printf "CPP $src_pathname --> $build_dir/src/compiler/glsl/glcpp/$cpp_filename\n"
16 $cpp $src_pathname -o $build_dir/src/compiler/glsl/glcpp/$cpp_filename \
17 -I$cc_internal_fixed_incdir \
18 -I$cc_internal_incdir \
19 -I$linux_incdir \
20 -I$syslib_incdir \
22 -I$build_dir/src/compiler/glsl/glcpp \
23 -I$src_dir/src/compiler/glsl/glcpp \
24 -I$build_dir/src/compiler/glsl \
25 -I$src_dir/src/compiler/glsl \
26 -I$build_dir/src/compiler/nir \
27 -I$src_dir/src/compiler/nir \
28 -I$build_dir/src/compiler \
29 -I$src_dir/src/compiler \
30 -I$build_dir/src/gallium/include \
31 -I$src_dir/src/gallium/include \
32 -I$build_dir/src/mapi \
33 -I$src_dir/src/mapi \
34 -I$build_dir/src/main \
35 -I$src_dir/src/main \
36 -I$build_dir/src/mesa \
37 -I$src_dir/src/mesa \
38 -I$build_dir/src \
39 -I$src_dir/src \
40 -I$build_dir/include \
41 -I$src_dir/include \
43 $syslib_cpp_flags_defs \
44 $linux_cpp_flags_defs \
45 $cc_builtins_cpp_flags_defs \
46 $cc_attributes_cpp_flags_defs \
47 $mesa_cpp_flags_defs \
49 $external_deps_cpp_flags &
50 done
51 #-------------------------------------------------------------------------------
52 wait
53 #------------------------------------------------------------------------------
54 for src_pathname in $libglcpp_c_pathnames
56 cpp_filename=$(basename $src_pathname .c).cpp.c
57 asm_filename=$(basename $src_pathname .c).cpp.c.s
58 printf "CC_S $build_dir/src/compiler/glsl/glcpp/$cpp_filename --> $build_dir/src/compiler/glsl/glcpp$asm_filename\n"
59 $cc_s $build_dir/src/compiler/glsl/glcpp/$cpp_filename -o $build_dir/src/compiler/glsl/glcpp/$asm_filename &
60 done
61 #------------------------------------------------------------------------------
62 wait
63 #------------------------------------------------------------------------------
64 os=
65 for src_pathname in $libglcpp_c_pathnames
67 asm_filename=$(basename $src_pathname .c).cpp.c.s
68 o_filename=$(basename $src_pathname .c).cpp.c.s.o
69 os="$os $build_dir/src/compiler/glsl/glcpp/$o_filename"
70 printf "AS $build_dir/src/compiler/glsl/glcpp/$asm_filename --> $build_dir/src/compiler/glsl/glcpp/$o_filename\n"
71 $as $build_dir/src/compiler/glsl/glcpp/$asm_filename -o $build_dir/src/compiler/glsl/glcpp/$o_filename &
72 done
73 #------------------------------------------------------------------------------
74 wait
75 #------------------------------------------------------------------------------
76 printf "AR RCS $build_dir/libglcpp.a $os\n"
77 $ar_rcs $build_dir/libglcpp.a $os &
78 #===============================================================================
79 libglsl_c_pathnames="\
80 $src_dir/src/compiler/glsl/gl_nir_detect_function_recursion.c \
81 $src_dir/src/compiler/glsl/gl_nir_lower_atomics.c \
82 $src_dir/src/compiler/glsl/gl_nir_lower_blend_equation_advanced.c \
83 $src_dir/src/compiler/glsl/gl_nir_lower_discard_flow.c \
84 $src_dir/src/compiler/glsl/gl_nir_lower_images.c \
85 $src_dir/src/compiler/glsl/gl_nir_lower_buffers.c \
86 $src_dir/src/compiler/glsl/gl_nir_lower_named_interface_blocks.c \
87 $src_dir/src/compiler/glsl/gl_nir_lower_samplers.c \
88 $src_dir/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c \
89 $src_dir/src/compiler/glsl/gl_nir_link_atomics.c \
90 $src_dir/src/compiler/glsl/gl_nir_link_interface_blocks.c \
91 $src_dir/src/compiler/glsl/gl_nir_link_uniform_initializers.c \
92 $src_dir/src/compiler/glsl/gl_nir_link_uniform_blocks.c \
93 $src_dir/src/compiler/glsl/gl_nir_link_uniforms.c \
94 $src_dir/src/compiler/glsl/gl_nir_link_varyings.c \
95 $src_dir/src/compiler/glsl/gl_nir_link_xfb.c \
96 $src_dir/src/compiler/glsl/gl_nir_linker.c \
97 $src_dir/src/compiler/glsl/gl_nir_lower_packed_varyings.c \
98 $src_dir/src/compiler/glsl/gl_nir_lower_xfb_varying.c \
99 $src_dir/src/compiler/glsl/gl_nir_opt_dead_builtin_varyings.c \
101 # There are still trash thinking coding c++ make them smart instead of filthy
102 # toxic.
103 libglsl_cxx_pathnames="\
104 $build_dir/src/compiler/glsl/glsl_parser.cpp \
105 $build_dir/src/compiler/glsl/glsl_lexer.cpp \
106 $src_dir/src/compiler/glsl/ast_array_index.cpp \
107 $src_dir/src/compiler/glsl/ast_expr.cpp \
108 $src_dir/src/compiler/glsl/ast_function.cpp \
109 $src_dir/src/compiler/glsl/ast_to_hir.cpp \
110 $src_dir/src/compiler/glsl/ast_type.cpp \
111 $src_dir/src/compiler/glsl/builtin_functions.cpp \
112 $src_dir/src/compiler/glsl/builtin_types.cpp \
113 $src_dir/src/compiler/glsl/builtin_variables.cpp \
114 $src_dir/src/compiler/glsl/glsl_parser_extras.cpp \
115 $src_dir/src/compiler/glsl/glsl_symbol_table.cpp \
116 $src_dir/src/compiler/glsl/glsl_to_nir.cpp \
117 $src_dir/src/compiler/glsl/hir_field_selection.cpp \
118 $src_dir/src/compiler/glsl/ir_array_refcount.cpp \
119 $src_dir/src/compiler/glsl/ir_basic_block.cpp \
120 $src_dir/src/compiler/glsl/ir_builder.cpp \
121 $src_dir/src/compiler/glsl/ir_clone.cpp \
122 $src_dir/src/compiler/glsl/ir_constant_expression.cpp \
123 $src_dir/src/compiler/glsl/ir.cpp \
124 $src_dir/src/compiler/glsl/ir_equals.cpp \
125 $src_dir/src/compiler/glsl/ir_expression_flattening.cpp \
126 $src_dir/src/compiler/glsl/ir_function_detect_recursion.cpp \
127 $src_dir/src/compiler/glsl/ir_function.cpp \
128 $src_dir/src/compiler/glsl/ir_hierarchical_visitor.cpp \
129 $src_dir/src/compiler/glsl/ir_hv_accept.cpp \
130 $src_dir/src/compiler/glsl/ir_print_visitor.cpp \
131 $src_dir/src/compiler/glsl/ir_reader.cpp \
132 $src_dir/src/compiler/glsl/ir_rvalue_visitor.cpp \
133 $src_dir/src/compiler/glsl/ir_validate.cpp \
134 $src_dir/src/compiler/glsl/ir_variable_refcount.cpp \
135 $src_dir/src/compiler/glsl/linker.cpp \
136 $src_dir/src/compiler/glsl/linker_util.cpp \
137 $src_dir/src/compiler/glsl/link_functions.cpp \
138 $src_dir/src/compiler/glsl/link_interface_blocks.cpp \
139 $src_dir/src/compiler/glsl/lower_builtins.cpp \
140 $src_dir/src/compiler/glsl/lower_instructions.cpp \
141 $src_dir/src/compiler/glsl/lower_jumps.cpp \
142 $src_dir/src/compiler/glsl/lower_mat_op_to_vec.cpp \
143 $src_dir/src/compiler/glsl/lower_precision.cpp \
144 $src_dir/src/compiler/glsl/lower_packing_builtins.cpp \
145 $src_dir/src/compiler/glsl/lower_subroutine.cpp \
146 $src_dir/src/compiler/glsl/lower_vec_index_to_cond_assign.cpp \
147 $src_dir/src/compiler/glsl/lower_vector_derefs.cpp \
148 $src_dir/src/compiler/glsl/opt_algebraic.cpp \
149 $src_dir/src/compiler/glsl/opt_dead_builtin_variables.cpp \
150 $src_dir/src/compiler/glsl/opt_dead_code.cpp \
151 $src_dir/src/compiler/glsl/opt_dead_code_local.cpp \
152 $src_dir/src/compiler/glsl/opt_flatten_nested_if_blocks.cpp \
153 $src_dir/src/compiler/glsl/opt_flip_matrices.cpp \
154 $src_dir/src/compiler/glsl/opt_function_inlining.cpp \
155 $src_dir/src/compiler/glsl/opt_if_simplification.cpp \
156 $src_dir/src/compiler/glsl/opt_minmax.cpp \
157 $src_dir/src/compiler/glsl/opt_rebalance_tree.cpp \
158 $src_dir/src/compiler/glsl/opt_tree_grafting.cpp \
159 $src_dir/src/compiler/glsl/propagate_invariance.cpp \
160 $src_dir/src/compiler/glsl/s_expression.cpp \
161 $src_dir/src/compiler/glsl/string_to_uint_map.cpp \
162 $src_dir/src/compiler/glsl/serialize.cpp \
163 $src_dir/src/compiler/glsl/shader_cache.cpp \
165 #-------------------------------------------------------------------------------
166 for src_pathname in $libglsl_c_pathnames
168 cpp_filename=$(basename $src_pathname .c).cpp.c
169 printf "CPP $src_pathname --> $build_dir/src/compiler/glsl/$cpp_filename\n"
170 $cpp $src_pathname -o $build_dir/src/compiler/glsl/$cpp_filename \
171 -I$cc_internal_fixed_incdir \
172 -I$cc_internal_incdir \
173 -I$linux_incdir \
174 -I$syslib_incdir \
176 -I$build_dir/src/compiler/glsl \
177 -I$src_dir/src/compiler/glsl \
178 -I$build_dir/src/compiler/nir \
179 -I$src_dir/src/compiler/nir \
180 -I$build_dir/src/compiler \
181 -I$src_dir/src/compiler \
182 -I$build_dir/src/gallium/include \
183 -I$src_dir/src/gallium/include \
184 -I$build_dir/src/mapi \
185 -I$src_dir/src/mapi \
186 -I$build_dir/src/mesa \
187 -I$src_dir/src/mesa \
188 -I$build_dir/src \
189 -I$src_dir/src \
190 -I$build_dir/include \
191 -I$src_dir/include \
193 $syslib_cpp_flags_defs \
194 $linux_cpp_flags_defs \
195 $cc_builtins_cpp_flags_defs \
196 $cc_attributes_cpp_flags_defs \
197 $mesa_cpp_flags_defs \
199 $external_deps_cpp_flags &
200 done
201 #-------------------------------------------------------------------------------
202 wait
203 #------------------------------------------------------------------------------
204 for src_pathname in $libglsl_c_pathnames
206 cpp_filename=$(basename $src_pathname .c).cpp.c
207 asm_filename=$(basename $src_pathname .c).cpp.c.s
208 printf "CC_S $build_dir/src/compiler/glsl/$cpp_filename --> $build_dir/src/compiler/glsl/$asm_filename\n"
209 $cc_s $build_dir/src/compiler/glsl/$cpp_filename -o $build_dir/src/compiler/glsl/$asm_filename &
210 done
211 #------------------------------------------------------------------------------
212 wait
213 #------------------------------------------------------------------------------
215 for src_pathname in $libglsl_c_pathnames
217 asm_filename=$(basename $src_pathname .c).cpp.c.s
218 o_filename=$(basename $src_pathname .c).cpp.c.s.o
219 os="$os $build_dir/src/compiler/glsl/$o_filename"
220 printf "AS $build_dir/src/compiler/glsl/$asm_filename --> $build_dir/src/compiler/glsl/$o_filename\n"
221 $as $build_dir/src/compiler/glsl/$asm_filename -o $build_dir/src/compiler/glsl/$o_filename &
222 done
223 #===============================================================================
224 for src_pathname in $libglsl_cxx_pathnames
226 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
227 printf "CXXPP $src_pathname --> $build_dir/src/compiler/glsl/$cxxpp_filename\n"
228 $cxxpp $src_pathname -o $build_dir/src/compiler/glsl/$cxxpp_filename \
229 -I$cc_internal_fixed_incdir \
230 -I$cc_internal_incdir \
231 -I$cxx_internal_incdir \
232 -I$linux_incdir \
233 -I$syslib_incdir \
235 -I$build_dir/src/compiler/glsl \
236 -I$src_dir/src/compiler/glsl \
237 -I$build_dir/src/compiler/nir \
238 -I$src_dir/src/compiler/nir \
239 -I$build_dir/src/compiler \
240 -I$src_dir/src/compiler \
241 -I$build_dir/src/gallium/include \
242 -I$src_dir/src/gallium/include \
243 -I$build_dir/src/mapi \
244 -I$src_dir/src/mapi \
245 -I$build_dir/src/mesa \
246 -I$src_dir/src/mesa \
247 -I$build_dir/src \
248 -I$src_dir/src \
249 -I$build_dir/include \
250 -I$src_dir/include \
252 $syslib_cpp_flags_defs \
253 $linux_cpp_flags_defs \
254 $cc_builtins_cpp_flags_defs \
255 $cc_attributes_cpp_flags_defs \
256 $mesa_cpp_flags_defs \
258 $external_deps_cpp_flags &
259 done
260 #------------------------------------------------------------------------------
261 wait
262 #------------------------------------------------------------------------------
263 for src_pathname in $libglsl_cxx_pathnames
265 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
266 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
267 printf "CXX_S $build_dir/src/compiler/glsl/$cxxpp_filename --> $build_dir/src/compiler/glsl/$asm_filename\n"
268 $cxx_s $build_dir/src/compiler/glsl/$cxxpp_filename -o $build_dir/src/compiler/glsl/$asm_filename &
269 done
270 #------------------------------------------------------------------------------
271 wait
272 #------------------------------------------------------------------------------
273 # reuse os
274 for src_pathname in $libglsl_cxx_pathnames
276 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
277 o_filename=$(basename $src_pathname .cpp).cpp.cxx.s.o
278 os="$os $build_dir/src/compiler/glsl/$o_filename"
279 printf "AS $build_dir/src/compiler/glsl/$asm_filename --> $build_dir/src/compiler/glsl/$o_filename\n"
280 $as $build_dir/src/compiler/glsl/$asm_filename -o $build_dir/src/compiler/glsl/$o_filename &
281 done
282 #===============================================================================
283 wait
284 #===============================================================================
285 printf "AR RCS $build_dir/libglsl.a $os\n"
286 $ar_rcs $build_dir/libglsl.a $os
287 #===============================================================================
288 printf "\t<--glsl compiler sub-components built\n"