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

Makefile: Add support for symbol versioning (ON by default) #49012

Merged
merged 6 commits into from
Jun 29, 2023

Commits on Jun 27, 2023

  1. Makefile: Add support for symbol versioning (off by default)

    This change adds `DEFAULT_SYMBOL_VERSION` as a Makefile option. If
    specified, this will configure the linker to assign the specified
    version string to all Julia-exported symbols.
    
    The other half of the mechanism is `#define JL_SYMBOL_VERSION`, which
    is used by the ccall machinery to look up symbols by their version + name.
    topolarity committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    1c4819b View commit details
    Browse the repository at this point in the history
  2. Makefile: use sed for version script generation

    This changes the `.expmap` linker script generation to treat the source
    file as a template and uses `sed` to replace strings in that template.
    
    It also does a bit of re-naming, changing the template source to be
    `julia.expmap.in` and the output to be `julia.expmap` instead of
    `julia.generated.expmap`
    topolarity committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    28ed044 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    630719e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    46577c1 View commit details
    Browse the repository at this point in the history
  5. Makefile: enable symbol versioning by default

    This enables symbol versioning by default, with the version string
    `JL_LIBJULIA_1.10` (the version suffix is the SOMAJOR in general).
    
    As part of this change, the SOMAJOR has also been changed to be
    MAJOR.MINOR instead of just MAJOR. This is required to allow multiple
    minor releases of libjulia to live side-by-side in the same process.
    
    `SYMBOL_VERSION_SUFFIX` is provided to allow appending an additional
    unique "salt" to SOMAJOR, which can be helpful for creating template
    binaries that will be "version-stamped" after distribution.
    topolarity committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    db9fff9 View commit details
    Browse the repository at this point in the history
  6. Move LLVM_SHLIB_SYMBOL_VERSION to llvm-ver.make

    Also, when `USE_SYSTEM_LLVM=1` compute `LLVM_SHLIB_SYMBOL_VERSION` using
    `llvm-config`
    topolarity committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    8ffc6ce View commit details
    Browse the repository at this point in the history