summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-11-14 00:56:17 +0800
committerruki <[email protected]>2025-11-14 00:56:17 +0800
commite160258067a89eb6c5f17dec5c073eadccad6976 (patch)
tree218be07847aadf2d6956c0b634b2865ee6a24a65
parentbf25df58ad3b58109c362f76d110229b63b9d19c (diff)
update tbox/configure
-rwxr-xr-xconfigure49
m---------core/src/tbox/tbox0
2 files changed, 16 insertions, 33 deletions
diff --git a/configure b/configure
index 4bc49b969..3c82790b6 100755
--- a/configure
+++ b/configure
@@ -4614,33 +4614,6 @@ _ninja_add_switches() {
}
_ninja_add_rules() {
- _get_targets_toolkinds; local kinds="${_ret}"
- local compile_kinds=""
- local kind=""
- for kind in ${kinds}; do
- case "${kind}" in
- cc|cxx|mm|mxx|as|cu) compile_kinds="${compile_kinds} ${kind}";;
- esac
- done
- if test_nz "${compile_kinds}"; then
- _dedup "${compile_kinds}"; compile_kinds="${_ret}"
- for kind in ${compile_kinds}; do
- _get_toolchain_toolset "${_target_toolchain}" "${kind}"; local program="${_ret}"
- if test_z "${program}"; then
- continue
- fi
- local command=""
- if is_host "msys" "cygwin" "mingw"; then
- command="sh -lc \"${program} -c \$ARGS -o \$out \$in\""
- else
- command="${program} -c \$ARGS -o \$out \$in"
- fi
- echo "rule ${kind}" >> "${xmake_sh_ninjafile}"
- echo " command = ${command}" >> "${xmake_sh_ninjafile}"
- echo " description = compiling.${_target_mode} \$in" >> "${xmake_sh_ninjafile}"
- echo "" >> "${xmake_sh_ninjafile}"
- done
- fi
echo "rule command" >> "${xmake_sh_ninjafile}"
echo " command = \$command" >> "${xmake_sh_ninjafile}"
echo " description = \$description" >> "${xmake_sh_ninjafile}"
@@ -4682,14 +4655,24 @@ _ninja_add_build_object() {
local objectfile="${3}"
path_sourcekind "${sourcefile}"; local sourcekind="${_ret}"
_get_target_flags "${target}" "${sourcekind}"; local flags="${_ret}"
- local rule="${sourcekind}"
- if test_nz "${flags}"; then
- _ninja_escape "${flags}"; flags="${_ret}"
+ _toolchain_compcmd "${sourcekind}" "${objectfile}" "${sourcefile}" "${flags}"; local compcmd="${_ret}"
+ path_directory "${objectfile}"; local objectdir="${_ret}"
+ local use_shell_wrapper=false
+ local command="mkdir -p \"${objectdir}\" && ${compcmd}"
+ if is_host "msys" "cygwin" "mingw"; then
+ use_shell_wrapper=true
fi
- echo "build ${objectfile}: ${rule} ${sourcefile}" >> "${xmake_sh_ninjafile}"
- if test_nz "${flags}"; then
- echo " ARGS = ${flags}" >> "${xmake_sh_ninjafile}"
+ if ${use_shell_wrapper}; then
+ _shell_escape_single_quotes "${command}"; local command_script="${_ret}"
+ command="sh -lc ${command_script}"
fi
+ local description="compiling.${_target_mode} ${sourcefile}"
+ _ninja_escape "${command}"; command="${_ret}"
+ _ninja_escape "${description}"; description="${_ret}"
+ echo "build ${objectfile}: command ${sourcefile}" >> "${xmake_sh_ninjafile}"
+ echo " command = ${command}" >> "${xmake_sh_ninjafile}"
+ echo " description = ${description}" >> "${xmake_sh_ninjafile}"
+ echo " restat = 0" >> "${xmake_sh_ninjafile}"
echo "" >> "${xmake_sh_ninjafile}"
}
diff --git a/core/src/tbox/tbox b/core/src/tbox/tbox
-Subproject 0600fc5b0dfc80ec50c583c2c2799ebec7bc6f5
+Subproject a0577a18b0a43cf1585a97a71cd29c3ee477b51