Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clang sanitizers #20

Merged
merged 13 commits into from
Nov 27, 2024
Prev Previous commit
Next Next commit
review notes
AndreyMlashkin committed Nov 27, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 03545ca2f3a108b2b190134d182e4a050c17d21a
26 changes: 17 additions & 9 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -40,13 +40,6 @@
enableDebug = false;
sanitize = true;
});
crypto3-clang-sanitize-bench = (pkgs.callPackage ./crypto3.nix {
stdenv = pkgs.llvmPackages_19.stdenv;
runTests = true;
enableDebug = false;
sanitize = true;
benchmarkTests = true;
});
crypto3-clang-bench = (pkgs.callPackage ./crypto3.nix {
runTests = true;
enableDebug = false;
@@ -66,6 +59,11 @@
runTests = true;
enableDebug = false;
});
parallel-crypto3-clang-bench = (pkgs.callPackage ./parallel-crypto3.nix {
runTests = true;
enableDebug = false;
benchmarkTests = true;
});
parallel-crypto3-debug-tests = (pkgs.callPackage ./parallel-crypto3.nix {
enableDebug = true;
runTests = true;
@@ -129,17 +127,21 @@
enableDebug = false;
sanitize = true;
});
crypto3-clang-sanitize-bench = (pkgs.callPackage ./crypto3.nix {
crypto3-clang-bench = (pkgs.callPackage ./crypto3.nix {
stdenv = pkgs.llvmPackages_19.stdenv;
runTests = true;
enableDebug = false;
sanitize = true;
benchmarkTests = true;
});

parallel-crypto3-gcc = (pkgs.callPackage ./parallel-crypto3.nix {
runTests = true;
enableDebug = false;
benchmarkTests = true;
});
parallel-crypto3-gcc-bench = (pkgs.callPackage ./parallel-crypto3.nix {
runTests = true;
enableDebug = false;
});
parallel-crypto3-clang = (pkgs.callPackage ./parallel-crypto3.nix {
stdenv = pkgs.llvmPackages_19.stdenv;
@@ -151,6 +153,12 @@
runTests = true;
enableDebug = false;
});
parallel-crypto3-clang-bench = (pkgs.callPackage ./parallel-crypto3.nix {
stdenv = pkgs.llvmPackages_19.stdenv;
runTests = true;
enableDebug = false;
benchmarkTests = true;
});

proof-producer-gcc = (pkgs.callPackage ./proof-producer.nix {
runTests = true;
2 changes: 2 additions & 0 deletions parallel-crypto3.nix
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@
enableDebug ? false,
runTests ? false,
sanitize? false,
benchmarkTests ? false,
}:
let
inherit (lib) optional;
@@ -34,6 +35,7 @@ in stdenv.mkDerivation {
(if runTests then "-DBUILD_PARALLEL_CRYPTO3_TESTS=TRUE" else "")
(if enableDebug then "-DCMAKE_BUILD_TYPE=Debug" else "-DCMAKE_BUILD_TYPE=Release")
(if sanitize then "-DSANITIZE=ON" else "-DSANITIZE=OFF")
(if benchmarkTests then "-DENABLE_BENCHMARKS=ON" else "-DENABLE_BENCHMARKS=OFF")
"-DPARALLEL_CRYPTO3_ENABLE=TRUE"
];