mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-04-22 06:02:06 +02:00
for linux build script added -verbose
This commit is contained in:
parent
77d6b7d1ec
commit
c3bbecff17
1 changed files with 16 additions and 0 deletions
|
@ -35,6 +35,8 @@ BUILD_TYPE=-1
|
||||||
|
|
||||||
CLEAN_BUILD=0
|
CLEAN_BUILD=0
|
||||||
|
|
||||||
|
VERBOSE=0
|
||||||
|
|
||||||
for (( i=1; i<=$#; i++ )); do
|
for (( i=1; i<=$#; i++ )); do
|
||||||
var="${!i}"
|
var="${!i}"
|
||||||
if [[ "$var" = "-j" ]]; then
|
if [[ "$var" = "-j" ]]; then
|
||||||
|
@ -63,6 +65,8 @@ for (( i=1; i<=$#; i++ )); do
|
||||||
BUILD_TOOL_LOBBY32=0
|
BUILD_TOOL_LOBBY32=0
|
||||||
elif [[ "$var" = "-tool-lobby-64" ]]; then
|
elif [[ "$var" = "-tool-lobby-64" ]]; then
|
||||||
BUILD_TOOL_LOBBY64=0
|
BUILD_TOOL_LOBBY64=0
|
||||||
|
elif [[ "$var" = "-verbose" ]]; then
|
||||||
|
VERBOSE=1
|
||||||
elif [[ "$var" = "clean" ]]; then
|
elif [[ "$var" = "clean" ]]; then
|
||||||
CLEAN_BUILD=1
|
CLEAN_BUILD=1
|
||||||
elif [[ "$var" = "release" ]]; then
|
elif [[ "$var" = "release" ]]; then
|
||||||
|
@ -322,6 +326,12 @@ function build_for () {
|
||||||
|
|
||||||
echo " -- Compiling object files with $build_threads parallel jobs inside directory '$tmp_work_dir/'"
|
echo " -- Compiling object files with $build_threads parallel jobs inside directory '$tmp_work_dir/'"
|
||||||
local build_cmd="clang++ -c -x c++ $common_compiler_args $cpiler_pic_pie $cpiler_m32 $optimize_level $dbg_level $release_ignore_warn $release_defs $extra_defs ${target_incs[@]} '{1}' '-o{2}'"
|
local build_cmd="clang++ -c -x c++ $common_compiler_args $cpiler_pic_pie $cpiler_m32 $optimize_level $dbg_level $release_ignore_warn $release_defs $extra_defs ${target_incs[@]} '{1}' '-o{2}'"
|
||||||
|
|
||||||
|
if [[ $VERBOSE = 1 ]]; then
|
||||||
|
printf '%s\n' "${build_cmds[@]}" | "$parallel_exe" --dry-run -j$build_threads -d '<>' -k "$build_cmd"
|
||||||
|
echo;
|
||||||
|
fi
|
||||||
|
|
||||||
printf '%s\n' "${build_cmds[@]}" | "$parallel_exe" -j$build_threads -d '<>' -k "$build_cmd"
|
printf '%s\n' "${build_cmds[@]}" | "$parallel_exe" -j$build_threads -d '<>' -k "$build_cmd"
|
||||||
exit_code=$?
|
exit_code=$?
|
||||||
echo " -- Exit code = $exit_code"
|
echo " -- Exit code = $exit_code"
|
||||||
|
@ -343,8 +353,14 @@ function build_for () {
|
||||||
echo "[X] No files to link" >&2;
|
echo "[X] No files to link" >&2;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/developer_guide/gcc-using-libraries#gcc-using-libraries_using-both-static-dynamic-library-gcc
|
# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/developer_guide/gcc-using-libraries#gcc-using-libraries_using-both-static-dynamic-library-gcc
|
||||||
# https://linux.die.net/man/1/ld
|
# https://linux.die.net/man/1/ld
|
||||||
|
if [[ $VERBOSE = 1 ]]; then
|
||||||
|
echo "clang++ $common_compiler_args $cpiler_pic_pie $cpiler_m32 $optimize_level $dbg_level $linker_pic_pie $linker_strip_dbg_symbols -o" "$out_filepath" "${obj_files[@]}" "${target_libs_dirs[@]/#/-L}" "-Wl,--whole-archive -Wl,-Bstatic" "${release_libs[@]/#/-l}" "-Wl,-Bdynamic -Wl,--no-whole-archive -Wl,--exclude-libs,ALL"
|
||||||
|
echo;
|
||||||
|
fi
|
||||||
|
|
||||||
clang++ $common_compiler_args $cpiler_pic_pie $cpiler_m32 $optimize_level $dbg_level $linker_pic_pie $linker_strip_dbg_symbols -o "$out_filepath" "${obj_files[@]}" "${target_libs_dirs[@]/#/-L}" -Wl,--whole-archive -Wl,-Bstatic "${release_libs[@]/#/-l}" -Wl,-Bdynamic -Wl,--no-whole-archive -Wl,--exclude-libs,ALL
|
clang++ $common_compiler_args $cpiler_pic_pie $cpiler_m32 $optimize_level $dbg_level $linker_pic_pie $linker_strip_dbg_symbols -o "$out_filepath" "${obj_files[@]}" "${target_libs_dirs[@]/#/-L}" -Wl,--whole-archive -Wl,-Bstatic "${release_libs[@]/#/-l}" -Wl,-Bdynamic -Wl,--no-whole-archive -Wl,--exclude-libs,ALL
|
||||||
exit_code=$?
|
exit_code=$?
|
||||||
echo " -- Exit code = $exit_code"
|
echo " -- Exit code = $exit_code"
|
||||||
|
|
Loading…
Add table
Reference in a new issue