Skip to content

Commit 86cf263

Browse files
committed
RV64: Include backend only once in multilevel build
When multiple parameters sets are bundled into a single build, the RV64 backend should only be included once. This commit adjusts the compilation guard in `native/riscv64/src/rv64v_poly.c accordingly. Signed-off-by: Hanno Becker <[email protected]>
1 parent f60b8d5 commit 86cf263

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mlkem/native/riscv64/src/rv64v_poly.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
#include "../../../common.h"
99

10-
#if defined(MLK_ARITH_BACKEND_RISCV64)
10+
#if defined(MLK_ARITH_BACKEND_RISCV64) && \
11+
!defined(MLK_CONFIG_MULTILEVEL_NO_SHARED)
1112

1213
#include <riscv_vector.h>
1314
#include "arith_native_riscv64.h"
@@ -806,11 +807,11 @@ unsigned int mlk_rv64v_rej_uniform(int16_t *r, unsigned int len,
806807
return ctr;
807808
}
808809

809-
#else /* MLK_ARITH_BACKEND_RISCV64 */
810+
#else /* MLK_ARITH_BACKEND_RISCV64 && !MLK_CONFIG_MULTILEVEL_NO_SHARED */
810811

811812
MLK_EMPTY_CU(rv64v_poly)
812813

813-
#endif /* !MLK_ARITH_BACKEND_RISCV64 */
814+
#endif /* !(MLK_ARITH_BACKEND_RISCV64 && !MLK_CONFIG_MULTILEVEL_NO_SHARED) */
814815

815816
/* To facilitate single-compilation-unit (SCU) builds, undefine all macros.
816817
* Don't modify by hand -- this is auto-generated by scripts/autogen. */

0 commit comments

Comments
 (0)