-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix([email protected]): support
pure = "on"
This switches the `purego` build tag to use the `cgo` tag which allows the source files to be correctly conditionally included in the build actions. There is a second patch that adds a couple of unit tests that have `pure = "on"` enabled to prevent regressions.
- Loading branch information
1 parent
13718a8
commit bfbe7ef
Showing
9 changed files
with
3,545 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module( | ||
name = "circl", | ||
version = "1.3.7.bcr.1", | ||
) | ||
|
||
bazel_dep(name = "rules_go", version = "0.39.1", repo_name = "io_bazel_rules_go") | ||
bazel_dep(name = "gazelle", version = "0.31.0") | ||
|
||
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") | ||
go_deps.from_file(go_mod = "//:go.mod") | ||
use_repo( | ||
go_deps, | ||
"com_github_bwesterb_go_ristretto", | ||
"org_golang_x_crypto", | ||
"org_golang_x_sys", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
commit f88c99d4b8d02731ede3fd7e3a5f01fe84336c31 | ||
Author: Fabian Meumertzheim <[email protected]> | ||
Date: Tue Jan 9 08:55:10 2024 +0100 | ||
|
||
Add MODULE.bazel | ||
|
||
diff --git a/MODULE.bazel b/MODULE.bazel | ||
new file mode 100644 | ||
index 0000000..9754824 | ||
--- /dev/null | ||
+++ b/MODULE.bazel | ||
@@ -0,0 +1,16 @@ | ||
+module( | ||
+ name = "circl", | ||
+ version = "1.3.7.bcr.1", | ||
+) | ||
+ | ||
+bazel_dep(name = "rules_go", version = "0.39.1", repo_name = "io_bazel_rules_go") | ||
+bazel_dep(name = "gazelle", version = "0.31.0") | ||
+ | ||
+go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") | ||
+go_deps.from_file(go_mod = "//:go.mod") | ||
+use_repo( | ||
+ go_deps, | ||
+ "com_github_bwesterb_go_ristretto", | ||
+ "org_golang_x_crypto", | ||
+ "org_golang_x_sys", | ||
+) |
59 changes: 59 additions & 0 deletions
59
modules/circl/1.3.7.bcr.1/patches/add_pure_tests_for_mathmatical_libraries.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
From a8c4375a01c55eaef53e457a045e9874fc930d88 Mon Sep 17 00:00:00 2001 | ||
From: Matt Clarkson <[email protected]> | ||
Date: Fri, 15 Mar 2024 12:10:45 +0000 | ||
Subject: [PATCH] Add pure tests for mathmatical libraries | ||
|
||
The libraries have `noasm` support. These tests validate that support does not regress. | ||
--- | ||
dh/x25519/BUILD.bazel | 16 ++++++++++++++++ | ||
dh/x448/BUILD.bazel | 16 ++++++++++++++++ | ||
2 files changed, 32 insertions(+) | ||
|
||
diff --git a/dh/x25519/BUILD.bazel b/dh/x25519/BUILD.bazel | ||
index cacfcf1..7464c66 100644 | ||
--- a/dh/x25519/BUILD.bazel | ||
+++ b/dh/x25519/BUILD.bazel | ||
@@ -41,3 +41,19 @@ go_test( | ||
"//math/fp25519", | ||
], | ||
) | ||
+ | ||
+go_test( | ||
+ name = "x25519_pure_test", | ||
+ srcs = [ | ||
+ "curve_test.go", | ||
+ "key_test.go", | ||
+ ], | ||
+ data = glob(["testdata/**"]), | ||
+ embed = [":x25519"], | ||
+ pure = "on", | ||
+ deps = [ | ||
+ "//internal/conv", | ||
+ "//internal/test", | ||
+ "//math/fp25519", | ||
+ ], | ||
+) | ||
diff --git a/dh/x448/BUILD.bazel b/dh/x448/BUILD.bazel | ||
index 94a7b2b..b96c160 100644 | ||
--- a/dh/x448/BUILD.bazel | ||
+++ b/dh/x448/BUILD.bazel | ||
@@ -41,3 +41,19 @@ go_test( | ||
"//math/fp448", | ||
], | ||
) | ||
+ | ||
+go_test( | ||
+ name = "x448_pure_test", | ||
+ srcs = [ | ||
+ "curve_test.go", | ||
+ "key_test.go", | ||
+ ], | ||
+ data = glob(["testdata/**"]), | ||
+ embed = [":x448"], | ||
+ pure = "on", | ||
+ deps = [ | ||
+ "//internal/conv", | ||
+ "//internal/test", | ||
+ "//math/fp448", | ||
+ ], | ||
+) |
Oops, something went wrong.