diff --git a/.github/workflows/cross.yml b/.github/workflows/cross.yml index 40d568ddcda..d1ad2b73433 100644 --- a/.github/workflows/cross.yml +++ b/.github/workflows/cross.yml @@ -41,7 +41,7 @@ jobs: - [ powerpc64-unknown-linux-gnu, 1, 0 ] - [ powerpc64le-unknown-linux-gnu, 1, 0 ] - [ riscv64gc-unknown-linux-gnu, 0, 0 ] - - [ s390x-unknown-linux-gnu, 0, 0 ] + - [ s390x-unknown-linux-gnu, 0, 1 ] - [ x86_64-pc-windows-gnu, 0, 1 ] - [ x86_64-unknown-linux-musl, 0, 1 ] steps: diff --git a/aws-lc-fips-sys/builder/cmake_builder.rs b/aws-lc-fips-sys/builder/cmake_builder.rs index 97a99836e2a..56794a8aee6 100644 --- a/aws-lc-fips-sys/builder/cmake_builder.rs +++ b/aws-lc-fips-sys/builder/cmake_builder.rs @@ -60,6 +60,13 @@ fn find_cmake_command() -> Option { } } +fn has_target_cpu_optimization() -> bool { + matches!( + target_arch().as_str(), + "x86_64" | "x86" | "aarch64" | "arm" | "powerpc64" + ) +} + impl CmakeBuilder { pub(crate) fn new( manifest_dir: PathBuf, @@ -166,6 +173,14 @@ impl CmakeBuilder { } else { panic!("AWS_LC_SYS_NO_ASM only allowed for debug builds!") } + } else if !has_target_cpu_optimization() { + emit_warning(&format!( + "Assembly optimizations not available for target arch: {}.", + target_arch() + )); + // TODO: This should not be needed once resolved upstream + // See: https://github.com/aws/aws-lc-rs/issues/655 + cmake_cfg.define("OPENSSL_NO_ASM", "1"); } if cfg!(feature = "asan") {