mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-e509139f61a2b517ab7e4d08cafd227c2a149aa3 / contrib / compiler_aco.sh
blob98dda0ed0ab20068e237ad3d8f8e53980d536f18
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_insert_delay_alu.cpp \
12 $src_dir/src/amd/compiler/aco_instruction_selection.cpp \
13 $src_dir/src/amd/compiler/aco_instruction_selection_setup.cpp \
14 $src_dir/src/amd/compiler/aco_interface.cpp \
15 $src_dir/src/amd/compiler/aco_assembler.cpp \
16 $src_dir/src/amd/compiler/aco_insert_exec_mask.cpp \
17 $src_dir/src/amd/compiler/aco_insert_NOPs.cpp \
18 $src_dir/src/amd/compiler/aco_insert_waitcnt.cpp \
19 $src_dir/src/amd/compiler/aco_ir.cpp \
20 $src_dir/src/amd/compiler/aco_reduce_assign.cpp \
21 $src_dir/src/amd/compiler/aco_reindex_ssa.cpp \
22 $src_dir/src/amd/compiler/aco_register_allocation.cpp \
23 $src_dir/src/amd/compiler/aco_live_var_analysis.cpp \
24 $src_dir/src/amd/compiler/aco_lower_phis.cpp \
25 $src_dir/src/amd/compiler/aco_lower_subdword.cpp \
26 $src_dir/src/amd/compiler/aco_lower_to_cssa.cpp \
27 $src_dir/src/amd/compiler/aco_lower_to_hw_instr.cpp \
28 $build_dir/src/amd/compiler/aco_opcodes.cpp \
29 $src_dir/src/amd/compiler/aco_optimizer.cpp \
30 $src_dir/src/amd/compiler/aco_optimizer_postRA.cpp \
31 $src_dir/src/amd/compiler/aco_opt_value_numbering.cpp \
32 $src_dir/src/amd/compiler/aco_print_asm.cpp \
33 $src_dir/src/amd/compiler/aco_print_ir.cpp \
34 $src_dir/src/amd/compiler/aco_scheduler.cpp \
35 $src_dir/src/amd/compiler/aco_scheduler_ilp.cpp \
36 $src_dir/src/amd/compiler/aco_ssa_elimination.cpp \
37 $src_dir/src/amd/compiler/aco_spill.cpp \
38 $src_dir/src/amd/compiler/aco_statistics.cpp \
39 $src_dir/src/amd/compiler/aco_validate.cpp \
41 #------------------------------------------------------------------------------
42 for src_pathname in $libaco_cxx_pathnames
44 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
45 printf "CXXPP $src_pathname --> $build_dir/src/amd/compiler/$cxxpp_filename\n"
46 $cxxpp $src_pathname -o $build_dir/src/amd/compiler/$cxxpp_filename \
47 -I$cc_internal_fixed_incdir \
48 -I$cc_internal_incdir \
49 -I$cxx_internal_incdir \
50 -I$linux_incdir \
51 -I$syslib_incdir \
53 -I$build_dir/src/amd/compiler \
54 -I$src_dir/src/amd/compiler \
55 -I$src_dir/src/amd/vulkan \
56 -I$build_dir/src/amd/common \
57 -I$src_dir/src/amd/common \
58 -I$build_dir/src/amd \
59 -I$src_dir/src/amd \
60 -I$build_dir/src/compiler/nir \
61 -I$src_dir/src/compiler/nir \
62 -I$build_dir/src/compiler \
63 -I$src_dir/src/compiler \
64 -I$build_dir/src/mesa \
65 -I$src_dir/src/mesa \
66 -I$build_dir/src/gallium/include \
67 -I$src_dir/src/gallium/include \
68 -I$build_dir/src \
69 -I$src_dir/src \
70 -I$build_dir/include \
71 -I$src_dir/include \
73 $syslib_cpp_flags_defs \
74 $linux_cpp_flags_defs \
75 $cc_builtins_cpp_flags_defs \
76 $cc_attributes_cpp_flags_defs \
77 $mesa_cpp_flags_defs \
79 $external_deps_cpp_flags &
80 done
81 #------------------------------------------------------------------------------
82 wait
83 #------------------------------------------------------------------------------
84 for src_pathname in $libaco_cxx_pathnames
86 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
87 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
88 printf "CXX_S $build_dir/src/amd/compiler/$cxxpp_filename --> $build_dir/src/amd/compiler/$asm_filename\n"
89 $cxx_s $build_dir/src/amd/compiler/$cxxpp_filename -o $build_dir/src/amd/compiler/$asm_filename &
90 done
91 #------------------------------------------------------------------------------
92 wait
93 #------------------------------------------------------------------------------
94 libaco_a=
95 for src_pathname in $libaco_cxx_pathnames
97 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
98 o_filename=$(basename $src_pathname .cpp).cpp.cxx.s.o
99 libaco_a="$libaco_a $build_dir/src/amd/compiler/$o_filename"
100 printf "AS $build_dir/src/amd/compiler/$asm_filename --> $build_dir/src/amd/compiler/$o_filename\n"
101 $as $build_dir/src/amd/compiler/$asm_filename -o $build_dir/src/amd/compiler/$o_filename &
102 done
103 #------------------------------------------------------------------------------
104 wait
105 #------------------------------------------------------------------------------
106 printf "AR RCS $build_dir/libaco.a $libaco_a\n"
107 $ar_rcs $build_dir/libaco.a $libaco_a &
108 #===============================================================================
109 printf "\t<--aco compiler sub-components built\n"