Skip to content

Commit

Permalink
llext: automatically select LLEXT type
Browse files Browse the repository at this point in the history
When using a clang Cadence toolchain to build SOF and LLEXT modules
we need to select a different LLEXT type than when using a Zephyr gcc
toolchain.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
  • Loading branch information
lyakh authored and Eddy Hsu committed Jul 15, 2024
1 parent a35563a commit 203206c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/llext_relocatable.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_LLEXT_TYPE_ELF_RELOCATABLE=y
6 changes: 6 additions & 0 deletions scripts/xtensa-build-zephyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,12 @@ def build_platforms():
if args.debug:
overlays.append(str(pathlib.Path(SOF_TOP, "app", "debug_overlay.conf")))

# The xt-cland Cadence toolchain currently cannot link shared
# libraries for Xtensa. Therefore when it's used we switch to
# building relocatable ELF objects.
if platf_build_environ.get("ZEPHYR_TOOLCHAIN_VARIANT") == 'xt-clang':
overlays.append(str(pathlib.Path(SOF_TOP, "app", "llext_relocatable.conf")))

if overlays:
overlays = ";".join(overlays)
build_cmd.append(f"-DOVERLAY_CONFIG={overlays}")
Expand Down

0 comments on commit 203206c

Please sign in to comment.