Skip to content

Commit

Permalink
toolchain: fix output mode detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloudef committed Jan 21, 2024
1 parent dcba40e commit 905713e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cross/toolchain.nix
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ let
text = ''
shopt -s extglob
args=()
has_input=0
has_output=0
while [[ $# -gt 0 ]]; do
case "$1" in
-Wl,*)
Expand Down Expand Up @@ -119,16 +119,16 @@ let
shift;;
${concatStringsSep "|" sys_excluded})
shift;;
[^-]+)
has_input=1
-o)
has_output=1
args+=("$1")
shift;;
*)
args+=("$1")
shift;;
esac
done
if [[ $has_input == 0 ]]; then
if [[ $has_output == 0 ]]; then
exec zigtool ${cmd} ${concatStringsSep " " pp_args} "''${args[@]}"
else
exec zigtool ${cmd} ${concatStringsSep " " (pp_args ++ cc_args)} "''${args[@]}"
Expand Down

0 comments on commit 905713e

Please sign in to comment.