[llvm] [llvm] export private symbols needed by unittests (PR #145767)
Andrew Rogers via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 9 09:57:59 PDT 2025
andrurogerz wrote:
> I wonder if we should track these somehow? Since we will have some path towards a more formal definition of the API surface that is needed as ABI for the tools, we could work from there to a future where we can maintain source compatibility at least (C++ is not the best language for ABI stability).
@compnerd not sure it solves the problem you're thinking of, but I have considered aliasing `LLVM_ABI` to a different name, like `LLVM_ABI_FOR_TEST` or `LLVM_ABI_PRIVATE`, to use in places where it isn't actually supposed to be part of the public ABI. It would at least be a bit more self-documenting when people encounter it.
Ideally, I think unit tests that access private APIs should link statically against the components they test. Other functional tests should only use the public interface and can link against the shared library. Exporting some private interfaces in this PR is more of a pragmatic solution for the existing codebase.
https://github.com/llvm/llvm-project/pull/145767
More information about the llvm-commits
mailing list