mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-945288ffaecac106c978d10cd4d8512fa2992c47 / contrib / compiler_glsl.sh
blobf2cc642d0ae2a4b672e21e6a491f6d586c7a0220
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_lower_atomics.c \
81 $src_dir/src/compiler/glsl/gl_nir_lower_blend_equation_advanced.c \
82 $src_dir/src/compiler/glsl/gl_nir_lower_images.c \
83 $src_dir/src/compiler/glsl/gl_nir_lower_buffers.c \
84 $src_dir/src/compiler/glsl/gl_nir_lower_samplers.c \
85 $src_dir/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c \
86 $src_dir/src/compiler/glsl/gl_nir_link_atomics.c \
87 $src_dir/src/compiler/glsl/gl_nir_link_uniform_initializers.c \
88 $src_dir/src/compiler/glsl/gl_nir_link_uniform_blocks.c \
89 $src_dir/src/compiler/glsl/gl_nir_link_uniforms.c \
90 $src_dir/src/compiler/glsl/gl_nir_link_varyings.c \
91 $src_dir/src/compiler/glsl/gl_nir_link_xfb.c \
92 $src_dir/src/compiler/glsl/gl_nir_linker.c \
93 $src_dir/src/compiler/glsl/gl_nir_lower_packed_varyings.c \
94 $src_dir/src/compiler/glsl/gl_nir_lower_xfb_varying.c \
95 $src_dir/src/compiler/glsl/gl_nir_opt_dead_builtin_varyings.c \
97 # There are still trash thinking coding c++ make them smart instead of filthy
98 # toxic.
99 libglsl_cxx_pathnames="\
100 $build_dir/src/compiler/glsl/glsl_parser.cpp \
101 $build_dir/src/compiler/glsl/glsl_lexer.cpp \
102 $src_dir/src/compiler/glsl/ast_array_index.cpp \
103 $src_dir/src/compiler/glsl/ast_expr.cpp \
104 $src_dir/src/compiler/glsl/ast_function.cpp \
105 $src_dir/src/compiler/glsl/ast_to_hir.cpp \
106 $src_dir/src/compiler/glsl/ast_type.cpp \
107 $src_dir/src/compiler/glsl/builtin_functions.cpp \
108 $src_dir/src/compiler/glsl/builtin_types.cpp \
109 $src_dir/src/compiler/glsl/builtin_variables.cpp \
110 $src_dir/src/compiler/glsl/glsl_parser_extras.cpp \
111 $src_dir/src/compiler/glsl/glsl_symbol_table.cpp \
112 $src_dir/src/compiler/glsl/glsl_to_nir.cpp \
113 $src_dir/src/compiler/glsl/hir_field_selection.cpp \
114 $src_dir/src/compiler/glsl/ir_array_refcount.cpp \
115 $src_dir/src/compiler/glsl/ir_basic_block.cpp \
116 $src_dir/src/compiler/glsl/ir_builder.cpp \
117 $src_dir/src/compiler/glsl/ir_clone.cpp \
118 $src_dir/src/compiler/glsl/ir_constant_expression.cpp \
119 $src_dir/src/compiler/glsl/ir.cpp \
120 $src_dir/src/compiler/glsl/ir_equals.cpp \
121 $src_dir/src/compiler/glsl/ir_expression_flattening.cpp \
122 $src_dir/src/compiler/glsl/ir_function_can_inline.cpp \
123 $src_dir/src/compiler/glsl/ir_function_detect_recursion.cpp \
124 $src_dir/src/compiler/glsl/ir_function.cpp \
125 $src_dir/src/compiler/glsl/ir_hierarchical_visitor.cpp \
126 $src_dir/src/compiler/glsl/ir_hv_accept.cpp \
127 $src_dir/src/compiler/glsl/ir_print_visitor.cpp \
128 $src_dir/src/compiler/glsl/ir_reader.cpp \
129 $src_dir/src/compiler/glsl/ir_rvalue_visitor.cpp \
130 $src_dir/src/compiler/glsl/ir_validate.cpp \
131 $src_dir/src/compiler/glsl/ir_variable_refcount.cpp \
132 $src_dir/src/compiler/glsl/linker.cpp \
133 $src_dir/src/compiler/glsl/linker_util.cpp \
134 $src_dir/src/compiler/glsl/link_functions.cpp \
135 $src_dir/src/compiler/glsl/link_interface_blocks.cpp \
136 $src_dir/src/compiler/glsl/link_uniforms.cpp \
137 $src_dir/src/compiler/glsl/link_uniform_block_active_visitor.cpp \
138 $src_dir/src/compiler/glsl/link_uniform_blocks.cpp \
139 $src_dir/src/compiler/glsl/lower_builtins.cpp \
140 $src_dir/src/compiler/glsl/lower_discard_flow.cpp \
141 $src_dir/src/compiler/glsl/lower_instructions.cpp \
142 $src_dir/src/compiler/glsl/lower_jumps.cpp \
143 $src_dir/src/compiler/glsl/lower_mat_op_to_vec.cpp \
144 $src_dir/src/compiler/glsl/lower_precision.cpp \
145 $src_dir/src/compiler/glsl/lower_named_interface_blocks.cpp \
146 $src_dir/src/compiler/glsl/lower_packing_builtins.cpp \
147 $src_dir/src/compiler/glsl/lower_subroutine.cpp \
148 $src_dir/src/compiler/glsl/lower_vec_index_to_cond_assign.cpp \
149 $src_dir/src/compiler/glsl/lower_vector_derefs.cpp \
150 $src_dir/src/compiler/glsl/opt_algebraic.cpp \
151 $src_dir/src/compiler/glsl/opt_dead_builtin_variables.cpp \
152 $src_dir/src/compiler/glsl/opt_dead_code.cpp \
153 $src_dir/src/compiler/glsl/opt_dead_code_local.cpp \
154 $src_dir/src/compiler/glsl/opt_dead_functions.cpp \
155 $src_dir/src/compiler/glsl/opt_flatten_nested_if_blocks.cpp \
156 $src_dir/src/compiler/glsl/opt_flip_matrices.cpp \
157 $src_dir/src/compiler/glsl/opt_function_inlining.cpp \
158 $src_dir/src/compiler/glsl/opt_if_simplification.cpp \
159 $src_dir/src/compiler/glsl/opt_minmax.cpp \
160 $src_dir/src/compiler/glsl/opt_rebalance_tree.cpp \
161 $src_dir/src/compiler/glsl/opt_tree_grafting.cpp \
162 $src_dir/src/compiler/glsl/propagate_invariance.cpp \
163 $src_dir/src/compiler/glsl/s_expression.cpp \
164 $src_dir/src/compiler/glsl/string_to_uint_map.cpp \
165 $src_dir/src/compiler/glsl/serialize.cpp \
166 $src_dir/src/compiler/glsl/shader_cache.cpp \
168 #-------------------------------------------------------------------------------
169 for src_pathname in $libglsl_c_pathnames
171 cpp_filename=$(basename $src_pathname .c).cpp.c
172 printf "CPP $src_pathname --> $build_dir/src/compiler/glsl/$cpp_filename\n"
173 $cpp $src_pathname -o $build_dir/src/compiler/glsl/$cpp_filename \
174 -I$cc_internal_fixed_incdir \
175 -I$cc_internal_incdir \
176 -I$linux_incdir \
177 -I$syslib_incdir \
179 -I$build_dir/src/compiler/glsl \
180 -I$src_dir/src/compiler/glsl \
181 -I$build_dir/src/compiler/nir \
182 -I$src_dir/src/compiler/nir \
183 -I$build_dir/src/compiler \
184 -I$src_dir/src/compiler \
185 -I$build_dir/src/gallium/include \
186 -I$src_dir/src/gallium/include \
187 -I$build_dir/src/mapi \
188 -I$src_dir/src/mapi \
189 -I$build_dir/src/mesa \
190 -I$src_dir/src/mesa \
191 -I$build_dir/src \
192 -I$src_dir/src \
193 -I$build_dir/include \
194 -I$src_dir/include \
196 $syslib_cpp_flags_defs \
197 $linux_cpp_flags_defs \
198 $cc_builtins_cpp_flags_defs \
199 $cc_attributes_cpp_flags_defs \
200 $mesa_cpp_flags_defs \
202 $external_deps_cpp_flags &
203 done
204 #-------------------------------------------------------------------------------
205 wait
206 #------------------------------------------------------------------------------
207 for src_pathname in $libglsl_c_pathnames
209 cpp_filename=$(basename $src_pathname .c).cpp.c
210 asm_filename=$(basename $src_pathname .c).cpp.c.s
211 printf "CC_S $build_dir/src/compiler/glsl/$cpp_filename --> $build_dir/src/compiler/glsl/$asm_filename\n"
212 $cc_s $build_dir/src/compiler/glsl/$cpp_filename -o $build_dir/src/compiler/glsl/$asm_filename &
213 done
214 #------------------------------------------------------------------------------
215 wait
216 #------------------------------------------------------------------------------
218 for src_pathname in $libglsl_c_pathnames
220 asm_filename=$(basename $src_pathname .c).cpp.c.s
221 o_filename=$(basename $src_pathname .c).cpp.c.s.o
222 os="$os $build_dir/src/compiler/glsl/$o_filename"
223 printf "AS $build_dir/src/compiler/glsl/$asm_filename --> $build_dir/src/compiler/glsl/$o_filename\n"
224 $as $build_dir/src/compiler/glsl/$asm_filename -o $build_dir/src/compiler/glsl/$o_filename &
225 done
226 #===============================================================================
227 for src_pathname in $libglsl_cxx_pathnames
229 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
230 printf "CXXPP $src_pathname --> $build_dir/src/compiler/glsl/$cxxpp_filename\n"
231 $cxxpp $src_pathname -o $build_dir/src/compiler/glsl/$cxxpp_filename \
232 -I$cc_internal_fixed_incdir \
233 -I$cc_internal_incdir \
234 -I$cxx_internal_incdir \
235 -I$linux_incdir \
236 -I$syslib_incdir \
238 -I$build_dir/src/compiler/glsl \
239 -I$src_dir/src/compiler/glsl \
240 -I$build_dir/src/compiler/nir \
241 -I$src_dir/src/compiler/nir \
242 -I$build_dir/src/compiler \
243 -I$src_dir/src/compiler \
244 -I$build_dir/src/gallium/include \
245 -I$src_dir/src/gallium/include \
246 -I$build_dir/src/mapi \
247 -I$src_dir/src/mapi \
248 -I$build_dir/src/mesa \
249 -I$src_dir/src/mesa \
250 -I$build_dir/src \
251 -I$src_dir/src \
252 -I$build_dir/include \
253 -I$src_dir/include \
255 $syslib_cpp_flags_defs \
256 $linux_cpp_flags_defs \
257 $cc_builtins_cpp_flags_defs \
258 $cc_attributes_cpp_flags_defs \
259 $mesa_cpp_flags_defs \
261 $external_deps_cpp_flags &
262 done
263 #------------------------------------------------------------------------------
264 wait
265 #------------------------------------------------------------------------------
266 for src_pathname in $libglsl_cxx_pathnames
268 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
269 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
270 printf "CXX_S $build_dir/src/compiler/glsl/$cxxpp_filename --> $build_dir/src/compiler/glsl/$asm_filename\n"
271 $cxx_s $build_dir/src/compiler/glsl/$cxxpp_filename -o $build_dir/src/compiler/glsl/$asm_filename &
272 done
273 #------------------------------------------------------------------------------
274 wait
275 #------------------------------------------------------------------------------
276 # reuse os
277 for src_pathname in $libglsl_cxx_pathnames
279 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
280 o_filename=$(basename $src_pathname .cpp).cpp.cxx.s.o
281 os="$os $build_dir/src/compiler/glsl/$o_filename"
282 printf "AS $build_dir/src/compiler/glsl/$asm_filename --> $build_dir/src/compiler/glsl/$o_filename\n"
283 $as $build_dir/src/compiler/glsl/$asm_filename -o $build_dir/src/compiler/glsl/$o_filename &
284 done
285 #===============================================================================
286 wait
287 #===============================================================================
288 printf "AR RCS $build_dir/libglsl.a $os\n"
289 $ar_rcs $build_dir/libglsl.a $os
290 #===============================================================================
291 printf "\t<--glsl compiler sub-components built\n"