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

[dpdk-rs] Bug Fix: adjust linking to mlx5 devx #1100

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dpdk-rs/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ fn os_build() -> Result<()> {
let out_dir_s: String = env::var("OUT_DIR")?;
let out_dir: &Path = Path::new(&out_dir_s);

let devxlib_path: String = env::var("DEVX_LIB_PATH")?;
let libdpdk_path: String = env::var("LIBDPDK_PATH")?;

let include_path: String = format!("{}{}", libdpdk_path, "\\include");
Expand Down Expand Up @@ -64,18 +65,19 @@ fn os_build() -> Result<()> {
"librte_stack",
"librte_telemetry",
"librte_timer",
"mlx5devx",
];

let cflags: &str = "-mavx";

// Step 1: Now that we've compiled and installed DPDK, point cargo to the libraries.
println!("cargo:rustc-link-search={}", library_path);
println!("cargo:rustc-link-search={}", devxlib_path);

for lib in &libraries {
println!("cargo:rustc-link-lib=static:-bundle,+whole-archive={}", lib);
}

println!("cargo:rustc-link-lib=dylib={}", "mlx5devx");
println!("cargo:rustc-link-lib=dylib={}", "setupapi");
println!("cargo:rustc-link-lib=dylib={}", "dbghelp");
println!("cargo:rustc-link-lib=dylib={}", "mincore");
Expand Down