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

feat: pass extra cflags via LIBBPF_SYS_EXTRA_CFLAGS #93

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

kxxt
Copy link
Contributor

@kxxt kxxt commented Aug 8, 2024

Allow downstream users to pass extra compiler flags via LIBBPF_SYS_EXTRA_CFLAGS environment variable when vendoring libbpf, libz or libelf.

This could be used to set a custom include path when cross-compiling libbpf-sys. e.g. LIBBPF_SYS_EXTRA_CFLAGS="-I $(pwd)/aarch64/usr/include"

@kxxt kxxt mentioned this pull request Aug 10, 2024
Copy link
Collaborator

@danielocfb danielocfb left a comment

Choose a reason for hiding this comment

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

Overall seems fine to me. I suspect that ultimately we may want the ability to provide cflags for the individual libraries, but can be added later as needed.

build.rs Outdated Show resolved Hide resolved
Co-authored-by: @d-e-s-o @work <77694251+danielocfb@users.noreply.github.com>
@danielocfb danielocfb merged commit ea1e243 into libbpf:master Aug 16, 2024
7 checks passed
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.

2 participants