Skip to content

Commit

Permalink
Fixes to match rust build triplet and target triplet
Browse files Browse the repository at this point in the history
  • Loading branch information
sieniven committed Jul 26, 2023
1 parent d9d26e9 commit e3ecee5
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1375,19 +1375,21 @@ AC_SUBST(PROTOC)
AC_SUBST(PROTOC_INCLUDE_DIR)

dnl If the host and build triplets are the same, we keep this empty
if test x$host = x$build; then
RUST_HOST=`$ac_abs_confdir/make.sh get_rust_triplet "$build"`
if test $? != 0; then
AC_MSG_ERROR("unsupported build system")
fi

RUST_TARGET=`$ac_abs_confdir/make.sh get_rust_triplet "$host"`
if test $? != 0; then
AC_MSG_ERROR("unsupported host target")
fi

if test x$RUST_HOST = x$RUST_TARGET; then
RUST_TARGET=
RUST_HOST=
else
RUST_HOST=`$ac_abs_confdir/make.sh get_rust_triplet "$build"`
if test $? != 0; then
AC_MSG_ERROR("unsupported build system")
fi
RUST_TARGET=`$ac_abs_confdir/make.sh get_rust_triplet "$host"`
if test $? != 0; then
AC_MSG_ERROR("unsupported host target")
fi
fi

AC_SUBST(RUST_TARGET)
AC_SUBST(RUST_HOST)
AM_CONDITIONAL([HAVE_RUST_TARGET], [test x$RUST_TARGET != x])
Expand Down

0 comments on commit e3ecee5

Please sign in to comment.