Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/curve25519-dalek/tests/build_tests.sh # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / curve25519-dalek / tests / build_tests.sh` 88 lines ยท 3629 bytes Raw Blame History 1 #!/bin/bash 2 3 function match_and_report() { 4 PATTERN=$1 5 FILE=$2 6 7 if grep -q "$PATTERN" "$FILE"; then 8 echo build OK "$FILE" : "$PATTERN" 9 else 10 echo build ERROR "$FILE" : "$PATTERN" 11 echo ">>>>>>>>>>>>>>>>>>>>>>>>>>" 12 cat "$FILE" 13 echo "<<<<<<<<<<<<<<<<<<<<<<<<<<" 14 exit 1 15 fi 16 } 17 18 # Assuming naively 64 bit host 19 cargo clean 20 OUT=build_1.txt 21 env RUSTFLAGS="--cfg curve25519_dalek_diagnostics=\"build\"" cargo build > "$OUT" 2>&1 22 match_and_report "curve25519_dalek_backend is 'simd'" "$OUT" 23 match_and_report "curve25519_dalek_bits is '64'" "$OUT" 24 25 # Override to 32 bits assuming naively 64 bit build host 26 cargo clean 27 OUT=build_2.txt 28 env RUSTFLAGS="--cfg curve25519_dalek_diagnostics=\"build\" --cfg curve25519_dalek_bits=\"32\"" cargo build > "$OUT" 2>&1 29 match_and_report "curve25519_dalek_backend is 'serial'" "$OUT" 30 match_and_report "curve25519_dalek_bits is '32'" "$OUT" 31 32 # Override to 64 bits on 32 bit target 33 cargo clean 34 OUT=build_3.txt 35 env RUSTFLAGS="--cfg curve25519_dalek_diagnostics=\"build\" --cfg curve25519_dalek_bits=\"64\"" cargo build --target i686-unknown-linux-gnu > "$OUT" 2>&1 36 match_and_report "curve25519_dalek_backend is 'serial'" "$OUT" 37 match_and_report "curve25519_dalek_bits is '64'" "$OUT" 38 39 # 32 bit target default 40 cargo clean 41 OUT=build_4.txt 42 env RUSTFLAGS="--cfg curve25519_dalek_diagnostics=\"build\"" cargo build --target i686-unknown-linux-gnu > "$OUT" 2>&1 43 match_and_report "curve25519_dalek_backend is 'serial'" "$OUT" 44 match_and_report "curve25519_dalek_bits is '32'" "$OUT" 45 46 # wasm 32 bit target default 47 cargo clean 48 OUT=build_5.txt 49 env RUSTFLAGS="--cfg curve25519_dalek_diagnostics=\"build\"" cargo build --target wasm32-unknown-unknown > "$OUT" 2>&1 50 match_and_report "curve25519_dalek_backend is 'serial'" "$OUT" 51 match_and_report "curve25519_dalek_bits is '32'" "$OUT" 52 53 # wasm 32 bit target default 54 # Attempted override w/ "simd" should result "serial" addition 55 cargo clean 56 OUT=build_5_1.txt 57 env RUSTFLAGS="--cfg curve25519_dalek_diagnostics=\"build\" --cfg curve25519_dalek_backend=\"simd\"" cargo build --target wasm32-unknown-unknown > "$OUT" 2>&1 58 # This overide must fail the compilation since "simd" is not available 59 # See: issues/532 60 match_and_report "Could not override curve25519_dalek_backend to simd" "$OUT" 61 62 # fiat override with default 64 bit naive host assumption 63 cargo clean 64 OUT=build_6.txt 65 env RUSTFLAGS="--cfg curve25519_dalek_diagnostics=\"build\" --cfg curve25519_dalek_backend=\"fiat\"" cargo build > "$OUT" 2>&1 66 match_and_report "curve25519_dalek_backend is 'fiat'" "$OUT" 67 match_and_report "curve25519_dalek_bits is '64'" "$OUT" 68 69 # fiat 32 bit override 70 cargo clean 71 OUT=build_7.txt 72 env RUSTFLAGS="--cfg curve25519_dalek_diagnostics=\"build\" --cfg curve25519_dalek_backend=\"fiat\" --cfg curve25519_dalek_bits=\"32\"" cargo build > "$OUT" 2>&1 73 match_and_report "curve25519_dalek_backend is 'fiat'" "$OUT" 74 match_and_report "curve25519_dalek_bits is '32'" "$OUT" 75 76 # serial override with default 64 bit naive host assumption 77 cargo clean 78 OUT=build_8.txt 79 env RUSTFLAGS="--cfg curve25519_dalek_diagnostics=\"build\" --cfg curve25519_dalek_backend=\"serial\"" cargo build > "$OUT" 2>&1 80 match_and_report "curve25519_dalek_backend is 'serial'" "$OUT" 81 match_and_report "curve25519_dalek_bits is '64'" "$OUT" 82 83 # serial 32 bit override 84 cargo clean 85 OUT=build_9.txt 86 env RUSTFLAGS="--cfg curve25519_dalek_diagnostics=\"build\" --cfg curve25519_dalek_backend=\"serial\" --cfg curve25519_dalek_bits=\"32\"" cargo build > "$OUT" 2>&1 87 match_and_report "curve25519_dalek_backend is 'serial'" "$OUT" 88 match_and_report "curve25519_dalek_bits is '32'" "$OUT"