diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index cf42b6f2f..44e257df0 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -33,4 +33,4 @@ jobs: - name: Run benchmark shell: nix develop .#ci -c bash -e {0} run: | - tests bench -c PMU -v + tests bench -c PMU --cpu cortex-a72 -v diff --git a/Makefile b/Makefile index f24454db8..7913708b1 100644 --- a/Makefile +++ b/Makefile @@ -9,23 +9,23 @@ INCLUDE_FIPS202 = -I fips202 INCLUDE_MLKEM = -I mlkem INCLUDE_RANDOM = -I randombytes INCLUDE_NISTRANDOM = -I test/nistrng -CFLAGS += -Wall -Wextra -Wpedantic -Werror -Wmissing-prototypes -Wredundant-decls \ +override CFLAGS += -Wall -Wextra -Wpedantic -Werror -Wmissing-prototypes -Wredundant-decls \ -Wshadow -Wpointer-arith -Wno-unknown-pragmas -O3 -fomit-frame-pointer -pedantic \ ${INCLUDE_MLKEM} ${INCLUDE_FIPS202} HOST_PLATFORM := $(shell uname -s)-$(shell uname -m) ifeq ($(HOST_PLATFORM),Linux-x86_64) - CFLAGS += -static + override CFLAGS += -static endif CYCLES ?= NO ifeq ($(CYCLES),PMU) - CFLAGS += -DPMU_CYCLES + override CFLAGS += -DPMU_CYCLES endif ifeq ($(CYCLES),PERF) - CFLAGS += -DPERF_CYCLES + override CFLAGS += -DPERF_CYCLES endif CFLAGS_RANDOMBYTES = ${CFLAGS} ${INCLUDE_RANDOM} diff --git a/scripts/tests b/scripts/tests index 8bbc0d91d..a7477cd11 100755 --- a/scripts/tests +++ b/scripts/tests @@ -300,7 +300,7 @@ def bench(force_qemu, verbose, cycles, cpu): lambda _: True, force_qemu, verbose, - f"CYCLES={cycles}", + [f"CYCLES={cycles}", f"CFLAGS=-mcpu={cpu}"], ) for scheme, result in results.items(): print(scheme)