Skip to content

Commit

Permalink
rebuild-testbench.sh: switch to new SOF_CC_BASE variable
Browse files Browse the repository at this point in the history
It was awkward to depend on ZEPHYR_TOOLCHAIN_VARIANT when the testbench
has absolutely nothing to do with it.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  • Loading branch information
marc-hb committed Aug 9, 2024
1 parent 2d4ee87 commit 537e583
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
10 changes: 2 additions & 8 deletions scripts/rebuild-testbench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,8 @@ setup_xtensa_tools_build()
test -n "${XTENSA_CORE}" ||
die "Illegal platform $BUILD_PLATFORM, no XTENSA_CORE found.\n"

# Zephyr is not part of the testbench at all but let's play nice and
# align with that naming convention to keep things simple.
case "${ZEPHYR_TOOLCHAIN_VARIANT}" in
xcc) COMPILER=xt-xcc;;
xt-clang) COMPILER=xt-clang;;
*) die 'Unknown or undefined ZEPHYR_TOOLCHAIN_VARIANT=%s\n' \
"${ZEPHYR_TOOLCHAIN_VARIANT}";;
esac
# This (local?) variable should probably be inlined
COMPILER=xt-"$SOF_CC_BASE"

install_bin=install/tools/$TOOLCHAIN_VER/XtensaTools/bin
tools_bin=$XTENSA_TOOLS_ROOT/$install_bin
Expand Down
6 changes: 3 additions & 3 deletions scripts/set_xtensa_params.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ case "$platform" in
;;
esac

# Pre-zephyr "XTOS" build
# Pre-zephyr "XTOS" build, testbench,...
case "$platform" in
none_yet)
mtl|lnl)
SOF_CC_BASE='clang';;
*)
SOF_CC_BASE='xcc';;
esac

# For Zephyr unit tests, testbench,...
# For Zephyr unit tests
case "$platform" in
imx8*|mtl|lnl)
ZEPHYR_TOOLCHAIN_VARIANT='xt-clang';;
Expand Down

0 comments on commit 537e583

Please sign in to comment.