[llvm] Enable LLVM_LINK_LLVM_DYLIB by default on non-Windows platforms #138187
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(This is a draft PR for cross-platform premerge testing)
As discussed in the RFC thread [1], this build configuration is a better
default because it uses less RAM and disk to build LLVM, which makes it
more accessible to beginners. The downside to the libLLVM build is that
it increases tool binary startup time, which can have major impacts on
configuration script times and the LLVM test suite itself. However, it
is better for new users configuring LLVM builds for the first time.
Long-time developers with beefy machines who prefer the finer grained
dependencies of static linking can still use the old model by opting out
with -DLLVM_LINK_LLVM_DYLIB=OFF. The fine-grained shared lib build is
also still supported via -DBUILD_SHARED_LIBS=ON.
MLIR's dylib build is configured to follow the LLVM dylib build, so this
changes the default for MLIR as well.
[1] https://discourse.llvm.org/t/rfc-llvm-link-llvm-dylib-should-default-to-on-on-posix-platforms/85908/1