Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llext: additional CMake harmonizations #67997

Merged
merged 4 commits into from
Apr 8, 2024

Commits on Mar 20, 2024

  1. cmake: conditionally enable shared library support

    When CONFIG_LLEXT is enabled, the Zephyr platform needs to enable dynamic
    library support. This is done by setting the `TARGET_SUPPORTS_SHARED_LIBS`
    property to `TRUE` in the global property scope.
    
    Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
    pillo79 committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    c2b6016 View commit details
    Browse the repository at this point in the history
  2. llext: use CMake shared library support on Xtensa

    This change reworks the Xtensa support in llext to use CMake's native
    shared library support, instead of manually running "gcc -shared".
    
    This change minimizes the differences in llext handling by defining
    appropriate CMake targets for the different architectures.
    
    Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
    pillo79 committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    8c0a051 View commit details
    Browse the repository at this point in the history
  3. llext: add llext_* configuration functions

    Remove the C_FLAGS argument from add_llext_target() and add a set of
    functions to configure the compilation and linking of an llext using
    the same API of the target_* functions.
    
    Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
    pillo79 committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    947d3d0 View commit details
    Browse the repository at this point in the history
  4. llext: add support for build time custom commands

    This patch adds support for custom commands to be executed during the
    build of an llext target. The commands can be executed at different
    points in the build process:
    
     - PRE_BUILD:  Before the llext code is linked.
     - POST_BUILD: After the llext code is built, but before packaging
    	       it in an .llext file.
     - POST_PKG:   After the llext file has been created.
    
    Note that PRE_BUILD is not supported for ARM targets, as in that case
    object files are used directly and there is no actual linking step.
    
    The commands can be added using the new add_llext_command() function.
    An example usage of it, along with some target properties, is added to
    the hello_world test case.
    
    Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
    pillo79 committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    cf0b25e View commit details
    Browse the repository at this point in the history