commit 9e7940b9be05ca36d3ac2fdfac07b61a6e0dfefd
Author: Fabian Meumertzheim <fabian@meumertzhe.im>
Date:   Tue Jan 9 09:00:27 2024 +0100

    Fix Gazelle-generated BUILD files
    
    * Added `cc_library` targets for header files referenced across packages
    * Removed BUILD files for code generators

diff --git a/dh/x25519/BUILD.bazel b/dh/x25519/BUILD.bazel
index f80aba0..cacfcf1 100644
--- a/dh/x25519/BUILD.bazel
+++ b/dh/x25519/BUILD.bazel
@@ -13,6 +13,8 @@ go_library(
         "key.go",
         "table.go",
     ],
+    cgo = True,
+    cdeps = ["//math/fp25519:header"],
     importpath = "github.com/cloudflare/circl/dh/x25519",
     visibility = ["//visibility:public"],
     deps = [
diff --git a/dh/x448/BUILD.bazel b/dh/x448/BUILD.bazel
index 31278c4..94a7b2b 100644
--- a/dh/x448/BUILD.bazel
+++ b/dh/x448/BUILD.bazel
@@ -13,6 +13,8 @@ go_library(
         "key.go",
         "table.go",
     ],
+    cgo = True,
+    cdeps = ["//math/fp448:header"],
     importpath = "github.com/cloudflare/circl/dh/x448",
     visibility = ["//visibility:public"],
     deps = [
diff --git a/math/fp25519/BUILD.bazel b/math/fp25519/BUILD.bazel
index f423b16..8db8f9e 100644
--- a/math/fp25519/BUILD.bazel
+++ b/math/fp25519/BUILD.bazel
@@ -1,5 +1,11 @@
 load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
 
+cc_library(
+    name = "header",
+    hdrs = ["fp_amd64.h"],
+    visibility  = ["//:__subpackages__"],
+)
+
 go_library(
     name = "fp25519",
     srcs = [
diff --git a/math/fp448/BUILD.bazel b/math/fp448/BUILD.bazel
index 80715a1..fc50c6e 100644
--- a/math/fp448/BUILD.bazel
+++ b/math/fp448/BUILD.bazel
@@ -1,5 +1,11 @@
 load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
 
+cc_library(
+    name = "header",
+    hdrs = ["fp_amd64.h"],
+    visibility  = ["//:__subpackages__"],
+)
+
 go_library(
     name = "fp448",
     srcs = [
diff --git a/pke/kyber/internal/common/asm/BUILD.bazel b/pke/kyber/internal/common/asm/BUILD.bazel
deleted file mode 100644
index 8ab4e7e..0000000
--- a/pke/kyber/internal/common/asm/BUILD.bazel
+++ /dev/null
@@ -1,20 +0,0 @@
-load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
-
-go_library(
-    name = "asm_lib",
-    srcs = ["src.go"],
-    importpath = "github.com/cloudflare/circl/pke/kyber/internal/common/asm",
-    visibility = ["//visibility:private"],
-    deps = [
-        "//pke/kyber/internal/common/params",
-        "@com_github_mmcloughlin_avo//build:go_default_library",
-        "@com_github_mmcloughlin_avo//operand:go_default_library",
-        "@com_github_mmcloughlin_avo//reg:go_default_library",
-    ],
-)
-
-go_binary(
-    name = "asm",
-    embed = [":asm_lib"],
-    visibility = ["//pke/kyber:__subpackages__"],
-)
diff --git a/sign/dilithium/internal/common/asm/BUILD.bazel b/sign/dilithium/internal/common/asm/BUILD.bazel
deleted file mode 100644
index 310fca6..0000000
--- a/sign/dilithium/internal/common/asm/BUILD.bazel
+++ /dev/null
@@ -1,20 +0,0 @@
-load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
-
-go_library(
-    name = "asm_lib",
-    srcs = ["src.go"],
-    importpath = "github.com/cloudflare/circl/sign/dilithium/internal/common/asm",
-    visibility = ["//visibility:private"],
-    deps = [
-        "//sign/dilithium/internal/common/params",
-        "@com_github_mmcloughlin_avo//build:go_default_library",
-        "@com_github_mmcloughlin_avo//operand:go_default_library",
-        "@com_github_mmcloughlin_avo//reg:go_default_library",
-    ],
-)
-
-go_binary(
-    name = "asm",
-    embed = [":asm_lib"],
-    visibility = ["//sign/dilithium:__subpackages__"],
-)
diff --git a/simd/keccakf1600/internal/asm/BUILD.bazel b/simd/keccakf1600/internal/asm/BUILD.bazel
deleted file mode 100644
index b595042..0000000
--- a/simd/keccakf1600/internal/asm/BUILD.bazel
+++ /dev/null
@@ -1,18 +0,0 @@
-load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
-
-go_library(
-    name = "asm_lib",
-    srcs = ["src.go"],
-    importpath = "github.com/cloudflare/circl/simd/keccakf1600/internal/asm",
-    visibility = ["//visibility:private"],
-    deps = [
-        "@com_github_mmcloughlin_avo//build:go_default_library",
-        "@com_github_mmcloughlin_avo//operand:go_default_library",
-    ],
-)
-
-go_binary(
-    name = "asm",
-    embed = [":asm_lib"],
-    visibility = ["//simd/keccakf1600:__subpackages__"],
-)
