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

[tools] Fix LLVM_USE_SANITIZE_COVERAGE build #87722

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

justinfargnoli
Copy link
Contributor

No description provided.

@justinfargnoli justinfargnoli self-assigned this Apr 4, 2024
@justinfargnoli justinfargnoli changed the title [Coverage] Fix USE_SANITIZE_COVERAGE build [Coverage] Fix LLVM_USE_SANITIZE_COVERAGE build Apr 4, 2024
@justinfargnoli justinfargnoli changed the title [Coverage] Fix LLVM_USE_SANITIZE_COVERAGE build [tools] Fix LLVM_USE_SANITIZE_COVERAGE build Apr 4, 2024
@justinfargnoli
Copy link
Contributor Author

Ping for review @nikic @labrinea

@@ -1,5 +1,7 @@
set(LLVM_LINK_COMPONENTS
BitReader
Core
Support
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary? They should already be transitive deps of BitReader:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be frank, I don't have a strong enough understanding of the LLVM build system to properly articulate an answer.

This change was necessary to get my local build working.

My local build uses -DBUILD_SHARED_LIBS=ON. When I tested -DBUILD_SHARED_LIBS=OFF, this change was not needed to use -DLLVM_USE_SANITIZE_COVERAGE=ON.

So, perhaps the transitive dependencies are not automatically added when using -DBUILD_SHARED_LIBS=ON. Does this seem reasonable to you @nikic?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm yeah, after looking at the cmake code a bit I think we make the dependencies of shared objects private.

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@justinfargnoli justinfargnoli merged commit f9d761d into llvm:main Apr 15, 2024
5 checks passed
aniplcc pushed a commit to aniplcc/llvm-project that referenced this pull request Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants