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

add shared library support #338

Merged
merged 4 commits into from
Dec 12, 2023
Merged

add shared library support #338

merged 4 commits into from
Dec 12, 2023

Commits on Dec 8, 2023

  1. add shared library support

    This adds support for building WASI shared libraries per
    https://github.com/WebAssembly/tool-conventions/blob/main/DynamicLinking.md.
    
    For the time being, the goal is to allow "pseudo-dynamic" linking using the
    Component Model per
    https://github.com/WebAssembly/component-model/blob/main/design/mvp/examples/SharedEverythingDynamicLinking.md.
    This requires all libraries to be available when the component is created, but
    still allows runtime symbol resolution via `dlopen`/`dlsym` backed by a static
    lookup table.  This is sufficient to support Python native extensions, for
    example.  A complete demo using `wit-component` is available at
    https://github.com/dicej/component-linking-demo.
    
    This requires https://reviews.llvm.org/D153293, which we will need to backport
    to LLVM 16 we're ready to upgrade to LLVM 17, hence the
    llvm-D153293-backport.patch file.
    
    Signed-off-by: Joel Dice <[email protected]>
    dicej committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    f3a801f View commit details
    Browse the repository at this point in the history
  2. move CMAKE_POSITION_INDEPENDENT_CODE to Makefile

    This is where I originally meant the directive to go, but it didn't seem to work
    the first time I tried it, hence the added lines in wasi-sdk.cmake and
    wasi-sdk-pthread.cmake.  However, it seems to work fine now, so I'm switching it
    back to be consistent with other similar CMake flags.
    
    Signed-off-by: Joel Dice <[email protected]>
    dicej committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    761202e View commit details
    Browse the repository at this point in the history
  3. update wasi-libc to main and llvm-project to release/17.x

    Signed-off-by: Joel Dice <[email protected]>
    dicej committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    3e0a45a View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2023

  1. remove explicit BUILTINS_LIB values

    As of WebAssembly/wasi-libc#442, these are determined
    automatically.
    
    Signed-off-by: Joel Dice <[email protected]>
    dicej committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    64cd0c0 View commit details
    Browse the repository at this point in the history