-
Notifications
You must be signed in to change notification settings - Fork 6
nix build system part 2 #1157
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
Draft
daniel-noland
wants to merge
35
commits into
pr/daniel-noland/dpdk-sys-take-2
Choose a base branch
from
pr/daniel-noland/dpdk-sys-take-2-phase-2
base: pr/daniel-noland/dpdk-sys-take-2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
nix build system part 2 #1157
daniel-noland
wants to merge
35
commits into
pr/daniel-noland/dpdk-sys-take-2
from
pr/daniel-noland/dpdk-sys-take-2-phase-2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
I put the profiles at the top level to start, but in retrospect there is little reason to put them there. It just makes the top level directory listing more noisy and spreads the nix code around. Signed-off-by: Daniel Noland <daniel@githedgehog.com>
These flags will be used in a follow up commit to build the x86_64 rust wrapper to dpdk. Signed-off-by: Daniel Noland <daniel@githedgehog.com>
These flags are empty for the moment, but may be needed in the future. They are included mostly for symmetry with the x86_64 build. Signed-off-by: Daniel Noland <daniel@githedgehog.com>
These are collections of commonly used C/CXX/LDFLAGS which can be recycled across other profiles. They will be connected to the build in a future commit. Signed-off-by: Daniel Noland <daniel@githedgehog.com>
This commit builds on prior work to introduce a functioning cross compile infrastructure for the dataplane, complete C/CXX/LDFLAGS calculated based on the user supplied target and profile. As of this commit, you should be able to compile dpdk with any combination of debug / release profiles, x86_64 / aarch64 processors, and gnu / musl libc. All of the following commands should work and should continue to work unless stated otherwise. ``` nix-build -f default.nix pkgs.dpdk nix-build -f default.nix --argstr prof 'debug' pkgs.dpdk nix-build -f default.nix --argstr prof 'release' pkgs.dpdk nix-build -f default.nix --argstr target 'x86_64-unknown-linux-gnu' pkgs.dpdk nix-build -f default.nix --argstr target 'x86_64-unknown-linux-musl' pkgs.dpdk nix-build -f default.nix --argstr target 'aarch64-unknown-linux-gnu' pkgs.dpdk nix-build -f default.nix --argstr target 'aarch64-unknown-linux-musl' pkgs.dpdk nix-build -f default.nix --argstr prof 'debug' --argstr target x86_64-unknown-linux-gnu pkgs.dpdk nix-build -f default.nix --argstr prof 'debug' --argstr target x86_64-unknown-linux-musl pkgs.dpdk nix-build -f default.nix --argstr prof 'release' --argstr target x86_64-unknown-linux-gnu pkgs.dpdk nix-build -f default.nix --argstr prof 'release' --argstr target x86_64-unknown-linux-musl pkgs.dpdk nix-build -f default.nix --argstr prof 'debug' --argstr target aarch64-unknown-linux-gnu pkgs.dpdk nix-build -f default.nix --argstr prof 'debug' --argstr target aarch64-unknown-linux-musl pkgs.dpdk nix-build -f default.nix --argstr prof 'release' --argstr target aarch64-unknown-linux-gnu pkgs.dpdk nix-build -f default.nix --argstr prof 'release' --argstr target aarch64-unknown-linux-musl pkgs.dpdk ``` Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
99deb22 to
1ff5324
Compare
ff4fdb8 to
4a5df4f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dependencies
Pull requests that update a dependency file
design
related to high level design
dont-merge
Do not merge this Pull Request
enhancement
New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note
(wait for #1142 to merge)
DPDK wrapper and compile-env
This PR is part 2 of my effort to absorb needed functions from dpdk-sys into dataplane using a native nix build system rather than the (very hacky) fake-nix method.
This PR has two main goals:
Reviewers of this PR should be able to successfully run all of the following commands on any reasonably modern Linux system with nix installed.