Skip to content

Commit 6636716

Browse files
committed
Include RV64 in SCU build
The single-compilation unit build `monolithic_build/mlkem_native_monobuild.c` did previously not include the new RV64 backend. This commit adjusts `scripts/autogen` to fix this. Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
1 parent 2652bd8 commit 6636716

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

examples/monolithic_build/mlkem_native_monobuild.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@
8787
#include "mlkem/native/x86_64/src/rej_uniform_avx2.c"
8888
#include "mlkem/native/x86_64/src/rej_uniform_table.c"
8989
#endif /* MLK_SYS_X86_64 */
90+
#if defined(MLK_SYS_RISCV64)
91+
#include "mlkem/native/riscv64/src/rv64v_poly.c"
92+
#endif
9093
#endif /* MLK_CONFIG_MONOBUILD_WITH_NATIVE_ARITH */
9194

9295
#if defined(MLK_CONFIG_MONOBUILD_WITH_NATIVE_FIPS202)

scripts/autogen

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,6 +1162,9 @@ def gen_monolithic_source_file(dry_run=False):
11621162
def x86_64(c):
11631163
return "x86_64" in c
11641164

1165+
def riscv64(c):
1166+
return "riscv64" in c
1167+
11651168
def native_fips202(c):
11661169
return native(c) and fips202(c)
11671170

@@ -1177,6 +1180,9 @@ def gen_monolithic_source_file(dry_run=False):
11771180
def native_arith_aarch64(c):
11781181
return native_arith(c) and aarch64(c)
11791182

1183+
def native_arith_riscv64(c):
1184+
return native_arith(c) and riscv64(c)
1185+
11801186
def native_arith_x86_64(c):
11811187
return native_arith(c) and x86_64(c)
11821188

@@ -1280,6 +1286,10 @@ def gen_monolithic_source_file(dry_run=False):
12801286
for c in filter(native_arith_x86_64, c_sources):
12811287
yield f'#include "{c}"'
12821288
yield "#endif"
1289+
yield "#if defined(MLK_SYS_RISCV64)"
1290+
for c in filter(native_arith_riscv64, c_sources):
1291+
yield f'#include "{c}"'
1292+
yield "#endif"
12831293
yield "#endif"
12841294
yield ""
12851295
yield "#if defined(MLK_CONFIG_MONOBUILD_WITH_NATIVE_FIPS202)"

0 commit comments

Comments
 (0)