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

Use runtime CARGO_CFG_TARGET_ARCH in build-script #959

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

kxxt
Copy link
Contributor

@kxxt kxxt commented Oct 7, 2024

option_env retrieves the CARGO_CFG_TARGET_ARCH at compile-time, which is not correct for the usage here. Instead, we should retrieve the variable using env::var at runtime in the build-script.

Fix https://github.com/kxxt/tracexec/actions/runs/11213953908/job/31168026074?pr=41

See also #958

option_env retrieves the CARGO_CFG_TARGET_ARCH at compile-time, which is
not correct for the usage here. Instead, we should retrieve the variable
using env::var at runtime in the build-script.
Copy link
Collaborator

@d-e-s-o d-e-s-o left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

@d-e-s-o d-e-s-o merged commit 704543e into libbpf:master Oct 7, 2024
13 checks passed
d-e-s-o added a commit to d-e-s-o/libbpf-rs that referenced this pull request Oct 7, 2024
Add a CHANGELOG entry for pull request libbpf#959, which fixed the
CARGO_CFG_TARGET_ARCH environment variable query from a build script in
a cross-compilation context.

Signed-off-by: Daniel Müller <[email protected]>
d-e-s-o added a commit that referenced this pull request Oct 7, 2024
Add a CHANGELOG entry for pull request #959, which fixed the
CARGO_CFG_TARGET_ARCH environment variable query from a build script in
a cross-compilation context.

Signed-off-by: Daniel Müller <[email protected]>
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