Skip to content

Commit

Permalink
Fix build~
Browse files Browse the repository at this point in the history
  • Loading branch information
thomwiggers committed Oct 16, 2023
1 parent b00207b commit 71eb839
Show file tree
Hide file tree
Showing 18 changed files with 276 additions and 281 deletions.
26 changes: 13 additions & 13 deletions implementations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,33 @@ kems:
This implementation requires a lot of stack space.
You need to specify ``RUST_MIN_STACK=800000000``, probably.
x86_avx2_guard: 'target_arch == "x86_64" && avx2_enabled && !is_windows'
implementations: [clean, avx]
implementations: [clean, avx2]
schemes:
- name: mceliece348864
implementations: [clean, avx]
implementations: [clean, avx2]
- name: mceliece348864f
implementations: [clean, avx]
implementations: [clean, avx2]
- name: mceliece460896
implementations: [clean, avx]
implementations: [clean, avx2]
- name: mceliece460896f
implementations: [clean, avx]
implementations: [clean, avx2]
- name: mceliece6688128
implementations: [clean, avx]
implementations: [clean, avx2]
doctest: no
- name: mceliece6688128f
implementations: [clean, avx]
implementations: [clean, avx2]
doctest: no
- name: mceliece6960119
implementations: [clean, avx]
implementations: [clean, avx2]
doctest: no
- name: mceliece6960119f
implementations: [clean, avx]
implementations: [clean, avx2]
doctest: no
- name: mceliece8192128
implementations: [clean, avx]
implementations: [clean, avx2]
doctest: no
- name: mceliece8192128f
implementations: [clean, avx]
implementations: [clean, avx2]
doctest: no
hqc:
version: 0.2.0
Expand Down Expand Up @@ -75,15 +75,15 @@ signs:
implementations: [clean, avx2, aarch64]
falcon:
version: 0.3.0
implementations: [clean, avx2]
implementations: [clean, avx2, aarch64]
schemes:
- name: falcon-512
implementations: [clean, avx2, aarch64]
- name: falcon-1024
implementations: [clean, avx2, aarch64]
sphincsplus:
version: 0.7.0
implementations: [clean, aesni, avx2]
implementations: [clean, avx2]
schemes:
- name: sphincs-shake-128f-simple
implementations: [clean, avx2]
Expand Down
20 changes: 10 additions & 10 deletions pqcrypto-classicmceliece/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,34 @@ methods only.

* ``mceliece348864``
* ``clean``
* ``avx`` (if supported)
* ``avx2`` (if supported)
* ``mceliece348864f``
* ``clean``
* ``avx`` (if supported)
* ``avx2`` (if supported)
* ``mceliece460896``
* ``clean``
* ``avx`` (if supported)
* ``avx2`` (if supported)
* ``mceliece460896f``
* ``clean``
* ``avx`` (if supported)
* ``avx2`` (if supported)
* ``mceliece6688128``
* ``clean``
* ``avx`` (if supported)
* ``avx2`` (if supported)
* ``mceliece6688128f``
* ``clean``
* ``avx`` (if supported)
* ``avx2`` (if supported)
* ``mceliece6960119``
* ``clean``
* ``avx`` (if supported)
* ``avx2`` (if supported)
* ``mceliece6960119f``
* ``clean``
* ``avx`` (if supported)
* ``avx2`` (if supported)
* ``mceliece8192128``
* ``clean``
* ``avx`` (if supported)
* ``avx2`` (if supported)
* ``mceliece8192128f``
* ``clean``
* ``avx`` (if supported)
* ``avx2`` (if supported)

## Notes

Expand Down
26 changes: 13 additions & 13 deletions pqcrypto-classicmceliece/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ macro_rules! build_clean {
};
}

macro_rules! build_avx {
macro_rules! build_avx2 {
($variant:expr) => {
let internals_include_path = &std::env::var("DEP_PQCRYPTO_INTERNALS_INCLUDEPATH").unwrap();
let common_dir = Path::new("pqclean/common");

let mut builder = cc::Build::new();
let target_dir: PathBuf = ["pqclean", "crypto_kem", $variant, "avx"].iter().collect();
let target_dir: PathBuf = ["pqclean", "crypto_kem", $variant, "avx2"].iter().collect();

let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
if target_os == "wasi" {
Expand Down Expand Up @@ -74,7 +74,7 @@ macro_rules! build_avx {
.into_iter()
.map(|p| p.unwrap().to_string_lossy().into_owned()),
);
builder.compile(format!("{}_avx", $variant).as_str());
builder.compile(format!("{}_avx2", $variant).as_str());
};
}

Expand All @@ -96,43 +96,43 @@ fn main() {

build_clean!("mceliece348864");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece348864");
build_avx2!("mceliece348864");
}
build_clean!("mceliece348864f");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece348864f");
build_avx2!("mceliece348864f");
}
build_clean!("mceliece460896");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece460896");
build_avx2!("mceliece460896");
}
build_clean!("mceliece460896f");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece460896f");
build_avx2!("mceliece460896f");
}
build_clean!("mceliece6688128");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece6688128");
build_avx2!("mceliece6688128");
}
build_clean!("mceliece6688128f");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece6688128f");
build_avx2!("mceliece6688128f");
}
build_clean!("mceliece6960119");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece6960119");
build_avx2!("mceliece6960119");
}
build_clean!("mceliece6960119f");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece6960119f");
build_avx2!("mceliece6960119f");
}
build_clean!("mceliece8192128");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece8192128");
build_avx2!("mceliece8192128");
}
build_clean!("mceliece8192128f");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece8192128f");
build_avx2!("mceliece8192128f");
}

if target_arch == "x86_64" && avx2_enabled && !is_windows {
Expand Down
Loading

0 comments on commit 71eb839

Please sign in to comment.