Skip to content

Commit

Permalink
Change build script to correctly check target arch
Browse files Browse the repository at this point in the history
  • Loading branch information
gememma committed Oct 29, 2024
1 parent c8ade79 commit 32db17a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mirrord/cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ fn main() {
);
};

#[cfg(all(target_os = "macos", target_arch = "aarch64"))]
if std::env::var("MIRRORD_LAYER_FILE_MACOS_ARM64").is_err() {
if std::env::var("MIRRORD_LAYER_FILE_MACOS_ARM64").is_err()
&& std::env::var("CARGO_CFG_TARGET_ARCH").is_ok_and(|t| t.eq("aarch64"))
{
println!("cargo::warning=No environment variable 'MIRRORD_LAYER_FILE_MACOS_ARM64' found - it should contain the path to the mirrord layer compiled for the `aarch64-apple-darwin` target");
exit(1);

Check failure on line 17 in mirrord/cli/build.rs

View workflow job for this annotation

GitHub Actions / check-rust-docs

cannot find function `exit` in this scope

Check failure on line 17 in mirrord/cli/build.rs

View workflow job for this annotation

GitHub Actions / check-rust-docs

cannot find function `exit` in this scope

Check failure on line 17 in mirrord/cli/build.rs

View workflow job for this annotation

GitHub Actions / build_binaries_x86_64-unknown-linux-gnu

cannot find function `exit` in this scope

Check failure on line 17 in mirrord/cli/build.rs

View workflow job for this annotation

GitHub Actions / build_binaries_aarch64-unknown-linux-gnu

cannot find function `exit` in this scope

Check failure on line 17 in mirrord/cli/build.rs

View workflow job for this annotation

GitHub Actions / macos_tests

cannot find function `exit` in this scope

Check failure on line 17 in mirrord/cli/build.rs

View workflow job for this annotation

GitHub Actions / lint

cannot find function `exit` in this scope

Check failure on line 17 in mirrord/cli/build.rs

View workflow job for this annotation

GitHub Actions / integration_tests

cannot find function `exit` in this scope

Check failure on line 17 in mirrord/cli/build.rs

View workflow job for this annotation

GitHub Actions / e2e (containerd)

cannot find function `exit` in this scope
};
Expand Down

0 comments on commit 32db17a

Please sign in to comment.