Lines Matching +full:ninja +full:- +full:build
2 # SPDX-License-Identifier: Apache-2.0
8 WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
11 echo -e "\033[0;31mFailure building ${app} ${conf_file} for ${BOARD}\033[0m\n\
13 "${cmake_cmd[@]@Q}" && ninja ${ninja_args}"
19 local app_root="${app_root:-${ZEPHYR_BASE}}"
20 local BOARD_ROOT="${BOARD_ROOT:-${ZEPHYR_BASE}}"
21 local conf_file="${conf_file:-prj.conf}"
22 local extra_conf_file="${extra_conf_file:-""}"
23 local conf_overlay="${conf_overlay:-""}"
24 local snippet="${snippet:-""}"
26 default_cmake_args=(-DCONFIG_COVERAGE=y -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
27 -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y -DCONFIG_ASSERT=y)
28 local cmake_args=(${cmake_args:-"${default_cmake_args[@]}"})
29 local cmake_extra_args=(${cmake_extra_args:-""})
30 local ninja_args="${ninja_args:-""}"
31 local cc_flags="${cc_flags:-""}"
36 local exe_basename="${exe_name:-bs_${BOARD}_${app}_${conf_file}_${overlay_file}}"
38 local exe_basename="${exe_name:-bs_${BOARD}_${app}_${conf_file}}"
51 local modules_arg="${ZEPHYR_MODULES:+-DZEPHYR_MODULES=${ZEPHYR_MODULES}}"
57 local cmake_cmd=(cmake -GNinja -DBOARD_ROOT=${BOARD_ROOT} -DBOARD=${BOARD})
59 local cmake_cmd+=( -DCONF_FILE=${conf_file})
62 local cmake_cmd+=( -DOVERLAY_CONFIG="${conf_overlay}" \
63 -DEXTRA_CONF_FILE="${extra_conf_file}" \
64 -DSNIPPET="${snippet}" \
66 "${cmake_args[@]}" ${cc_flags:+-DCMAKE_C_FLAGS=${cc_flags}} "${cmake_extra_args[@]}")
67 if [ -v sysbuild ]; then
68 local cmake_cmd+=( -DAPP_DIR=${app_root}/${app} ${ZEPHYR_BASE}/share/sysbuild/)
74 # Set INCR_BUILD when calling to only do an incremental build
75 if [ ! -v INCR_BUILD ] || [ ! -d "${this_dir}" ]; then
76 [ -d "${this_dir}" ] && rm "${this_dir}" -rf
77 mkdir -p "${this_dir}" && cd "${this_dir}"
83 ninja ${ninja_args} &> ninja.out || \
84 { ret="$?"; print_error_info ; cat ninja.out && return $ret; }
87 nm ${exe_name} | grep -v " [U|w] " | sort | cut -d" " -f1,3 > ${map_file_name}
88 sed -i "1i $(wc -l ${map_file_name} | cut -d" " -f1)" ${map_file_name}