mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-71d455b96fbf3807441f1b9bb82416928c77ac20 / contrib / compiler_aco.sh
blob0b5befa0b5563405c2c23ddc5c1a2a7ae0e4a337
1 printf "\tbuilding aco compiler sub-components-->\n"
2 #===============================================================================
3 mkdir -p $build_dir/src/amd/compiler
4 #------------------------------------------------------------------------------
5 # Gaben did not get the memo about c++ toxicity. That said, this is orders
6 # of magnitude less worse than llvm.
7 libaco_cxx_pathnames="\
8 $src_dir/src/amd/compiler/aco_form_hard_clauses.cpp \
9 $src_dir/src/amd/compiler/aco_dead_code_analysis.cpp \
10 $src_dir/src/amd/compiler/aco_dominance.cpp \
11 $src_dir/src/amd/compiler/aco_instruction_selection.cpp \
12 $src_dir/src/amd/compiler/aco_instruction_selection_setup.cpp \
13 $src_dir/src/amd/compiler/aco_interface.cpp \
14 $src_dir/src/amd/compiler/aco_assembler.cpp \
15 $src_dir/src/amd/compiler/aco_insert_exec_mask.cpp \
16 $src_dir/src/amd/compiler/aco_insert_NOPs.cpp \
17 $src_dir/src/amd/compiler/aco_insert_waitcnt.cpp \
18 $src_dir/src/amd/compiler/aco_ir.cpp \
19 $src_dir/src/amd/compiler/aco_reduce_assign.cpp \
20 $src_dir/src/amd/compiler/aco_reindex_ssa.cpp \
21 $src_dir/src/amd/compiler/aco_register_allocation.cpp \
22 $src_dir/src/amd/compiler/aco_live_var_analysis.cpp \
23 $src_dir/src/amd/compiler/aco_lower_phis.cpp \
24 $src_dir/src/amd/compiler/aco_lower_subdword.cpp \
25 $src_dir/src/amd/compiler/aco_lower_to_cssa.cpp \
26 $src_dir/src/amd/compiler/aco_lower_to_hw_instr.cpp \
27 $build_dir/src/amd/compiler/aco_opcodes.cpp \
28 $src_dir/src/amd/compiler/aco_optimizer.cpp \
29 $src_dir/src/amd/compiler/aco_optimizer_postRA.cpp \
30 $src_dir/src/amd/compiler/aco_opt_value_numbering.cpp \
31 $src_dir/src/amd/compiler/aco_print_asm.cpp \
32 $src_dir/src/amd/compiler/aco_print_ir.cpp \
33 $src_dir/src/amd/compiler/aco_scheduler.cpp \
34 $src_dir/src/amd/compiler/aco_scheduler_ilp.cpp \
35 $src_dir/src/amd/compiler/aco_ssa_elimination.cpp \
36 $src_dir/src/amd/compiler/aco_spill.cpp \
37 $src_dir/src/amd/compiler/aco_statistics.cpp \
38 $src_dir/src/amd/compiler/aco_validate.cpp \
40 #------------------------------------------------------------------------------
41 for src_pathname in $libaco_cxx_pathnames
43 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
44 printf "CXXPP $src_pathname --> $build_dir/src/amd/compiler/$cxxpp_filename\n"
45 $cxxpp $src_pathname -o $build_dir/src/amd/compiler/$cxxpp_filename \
46 -I$cc_internal_fixed_incdir \
47 -I$cc_internal_incdir \
48 -I$cxx_internal_incdir \
49 -I$linux_incdir \
50 -I$syslib_incdir \
52 -I$build_dir/src/amd/compiler \
53 -I$src_dir/src/amd/compiler \
54 -I$src_dir/src/amd/vulkan \
55 -I$build_dir/src/amd/common \
56 -I$src_dir/src/amd/common \
57 -I$build_dir/src/amd \
58 -I$src_dir/src/amd \
59 -I$build_dir/src/compiler/nir \
60 -I$src_dir/src/compiler/nir \
61 -I$build_dir/src/compiler \
62 -I$src_dir/src/compiler \
63 -I$build_dir/src/mesa \
64 -I$src_dir/src/mesa \
65 -I$build_dir/src/gallium/include \
66 -I$src_dir/src/gallium/include \
67 -I$build_dir/src \
68 -I$src_dir/src \
69 -I$build_dir/include \
70 -I$src_dir/include \
72 $syslib_cpp_flags_defs \
73 $linux_cpp_flags_defs \
74 $cc_builtins_cpp_flags_defs \
75 $cc_attributes_cpp_flags_defs \
76 $mesa_cpp_flags_defs \
78 $external_deps_cpp_flags &
79 done
80 #------------------------------------------------------------------------------
81 wait
82 #------------------------------------------------------------------------------
83 for src_pathname in $libaco_cxx_pathnames
85 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
86 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
87 printf "CXX_S $build_dir/src/amd/compiler/$cxxpp_filename --> $build_dir/src/amd/compiler/$asm_filename\n"
88 $cxx_s $build_dir/src/amd/compiler/$cxxpp_filename -o $build_dir/src/amd/compiler/$asm_filename &
89 done
90 #------------------------------------------------------------------------------
91 wait
92 #------------------------------------------------------------------------------
93 libaco_a=
94 for src_pathname in $libaco_cxx_pathnames
96 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
97 o_filename=$(basename $src_pathname .cpp).cpp.cxx.s.o
98 libaco_a="$libaco_a $build_dir/src/amd/compiler/$o_filename"
99 printf "AS $build_dir/src/amd/compiler/$asm_filename --> $build_dir/src/amd/compiler/$o_filename\n"
100 $as $build_dir/src/amd/compiler/$asm_filename -o $build_dir/src/amd/compiler/$o_filename &
101 done
102 #------------------------------------------------------------------------------
103 wait
104 #------------------------------------------------------------------------------
105 printf "AR RCS $build_dir/libaco.a $libaco_a\n"
106 $ar_rcs $build_dir/libaco.a $libaco_a &
107 #===============================================================================
108 printf "\t<--aco compiler sub-components built\n"