Skip to content

Commit

Permalink
Attempt to fix CI build issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmartin82 committed Dec 10, 2024
1 parent 002aa71 commit b316061
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: true
matrix:
os-arch:
- { os: "ubuntu-latest", arch: "X64" }
- { os: "ubuntu-22.04", arch: "X64" }
- { os: "windows-11", arch: "X64" }
- { os: "macos-ventura", arch: "ARM64" }
- { os: "ubuntu-22.04", arch: "ARM64" }
Expand Down
9 changes: 4 additions & 5 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,13 @@ fn main() {
let cyclonedds_include = cyclonedds.join("include");
let cyclocut_include = cyclocut.join("include");

// Libraries required by Iceoryx added here to avoid link line ordering issue on some platforms
// C++ library added here to avoid link line ordering issue on some platforms
if iceoryx_enabled {
#[cfg(target_os = "linux")]
println!("cargo:rustc-link-lib=stdc++");

#[cfg(target_os = "macos")]
println!("cargo:rustc-link-lib=c++");

println!("cargo:rustc-link-lib=static=iceoryx_hoofs");
println!("cargo:rustc-link-lib=static=iceoryx_posh");
println!("cargo:rustc-link-lib=static=iceoryx_platform");
}

let mut bindings = bindgen::Builder::default();
Expand Down Expand Up @@ -199,6 +195,9 @@ fn build_iceoryx(src_dir: &Path, out_dir: &Path) -> PathBuf {
// Add iceoryx lib to link
let iceoryx_lib = iceoryx_path.join("lib");
println!("cargo:rustc-link-search=native={}", iceoryx_lib.display());
println!("cargo:rustc-link-lib=static=iceoryx_hoofs");
println!("cargo:rustc-link-lib=static=iceoryx_posh");
println!("cargo:rustc-link-lib=static=iceoryx_platform");

#[cfg(target_os = "linux")]
println!("cargo:rustc-link-lib=acl");
Expand Down

0 comments on commit b316061

Please sign in to comment.