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

cmd/bpf2go: infer llvm-strip suffix from clang binary #504

Merged
merged 1 commit into from
Nov 26, 2021

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Nov 25, 2021

llvm is often available in multiple versions, with binaries having the
major version attached as a suffix, for example clang-13. Since adding
stripping it's now necessary to pass two flags when using such
versioned binaries:

bpf2go -cc clang-13 -strip llvm-strip-13 ...

Add a heuristic which derives the version suffix from the clang binary
and uses that to look for llvm-strip. This allows skipping the -strip
flag in the example above.

llvm is often available in multiple versions, with binaries having the
major version attached as a suffix, for example clang-13. Since adding
stripping it's now necessary to pass two flags when using such
versioned binaries:

    bpf2go -cc clang-13 -strip llvm-strip-13 ...

Add a heuristic which derives the version suffix from the clang binary
and uses that to look for llvm-strip. This allows skipping the -strip
flag in the example above.
Copy link
Collaborator

@ti-mo ti-mo left a comment

Choose a reason for hiding this comment

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

Cool, wanted to suggest something similar 👍

@ti-mo ti-mo merged commit 9ead52e into master Nov 26, 2021
@ti-mo ti-mo deleted the lmb/bpf2go-infer-strip branch November 26, 2021 07:58
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