-
Notifications
You must be signed in to change notification settings - Fork 164
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
Use absolute path for clang executable in modern_bpf driver #2032
Conversation
This is a very small change that should have no major impact on how the build works. However, when using ccache, having the clang executable resolve to the real path completely breaks compilation for the modern probe. Signed-off-by: Mauro Ezequiel Moltrasio <mmoltras@redhat.com>
/cc @Andreagit97 |
Question: why does it break the compilation? |
Perf diff from master - unit tests
Heap diff from master - unit tests
Heap diff from master - scap file
Benchmarks diff from master
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2032 +/- ##
==========================================
- Coverage 74.31% 74.30% -0.01%
==========================================
Files 253 253
Lines 30966 30966
Branches 5413 5418 +5
==========================================
- Hits 23011 23010 -1
- Misses 7955 7956 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
The default way ccache works is by adding symlinks to gcc, g++, clang and clang++, then when you call one of those to build a file the symlink resolves to ccache, it does some caching magic and delegates to the real compiler if it's needed. When clang resolves to the real path, ccache is called directly and it gets confused about all the arguments that should be passed to clang, breaking compilation with the message: I should've added the explanation on the PR description, sorry! |
Thanks Mauro, makes sense to me! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
LGTM label has been added. Git tree hash: 15efaeb351a8d01954ae531b217148ac2c078ac9
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, FedeDP, Molter73 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area build
/area driver-modern-bpf
Does this PR require a change in the driver versions?
What this PR does / why we need it:
This is a very small change that should have no major impact on how the build works. However, when using ccache, having the clang executable resolve to the real path completely breaks compilation for the modern probe.
I know there are other ways to configure ccache that would potentially be possible to have it working, but I would rather not have a custom configuration just for this component.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: I can't think of a particular reason to use the real versus the absolute path for clang other than getting it as part of a compilation error, but I would argue anyone building the modern probe should be skillful enough to track down what clang binary is being used without this. If there's any other reason, please do let me know.
Does this PR introduce a user-facing change?: