pq-code-package / mlkem-native

High-assurance, high-performance ML-KEM implementation for mobile, pc, and server targets
https://pq-code-package.github.io/mlkem-native/dev/bench/
Apache License 2.0
11 stars 9 forks source link

Adjust makefile for support -flto in nix shell #423

Closed potsrevennil closed 4 days ago

potsrevennil commented 4 days ago

Currently in nix shell, the build system won't properly linked if -flto is set.

This is due to that nix gcc comes with lto library, binutils like ar doesn't seem to properly configured regarding this.

The easiest workaround to make -flto work is therefore to avoid building libraries, let gcc take over everything.

Namespace checking needed to be updated as well, due to the new build system compiles fips202 artifact to test/build/mlkemxxx/fips202 now.