[fix](build) prevent math regression from global lance-c linkage - #67237
Open
linrrzqqq wants to merge 1 commit into
Open
[fix](build) prevent math regression from global lance-c linkage#67237linrrzqqq wants to merge 1 commit into
linrrzqqq wants to merge 1 commit into
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #65304
Problem Summary:
PR #65304 added the following libraries to
COMMON_THIRDPARTY:This unconditionally added an early -lm to the BE link command, before Doris's own glibc-compatibility library.
In the current toolchain, libm.so is a GNU ld script:
GROUP ( ./libglibc-compatibility.a ../../lib/libm.so.6 )As a result, the early -lm resolves exp, log, and log2 from the toolchain's compatibility archive before Doris's optimized compatibility implementations are considered. This causes significant performance regressions in arithmetic benchmarks:
In this pr, remove the unconditional addition of
mandlance_ctoCOMMON_THIRDPARTY, and the importedlance_ctarget is retained, so future Lance consumers can link it explicitly throughtarget_link_libraries()when the corresponding feature is enabled.This keeps the existing
glibc-compatibilitylink ordering unchanged and avoidsaffecting unrelated BE targets.
performance