Skip to content

Commit dd82205

Browse files
Feat: Solve the issue of different Verilator versions supporting -Wno-GENUNNAMED. Older versions, such as Verilator v5.008, do not support it, but for newer versions of Verilator like v5.040, an error will occur if it is not added.
1 parent e05d6a7 commit dd82205

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

Makefile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
ifeq ($(shell verilator -Wno-GENUNNAMED --version >/dev/null 2>&1 && echo YES),YES)
2+
SUPPORTS_GENUNNAMED := -Wno-GENUNNAMED
3+
endif
4+
15
VERILATOR_FLAGS = \
2-
--cc --build --threads 4 --unroll-stmts 999999 -unroll-count 999999 --assert -Wall -Wno-BLKSEQ -Wno-UNUSED \
3-
-Wno-PINCONNECTEMPTY -Wno-DECLFILENAME -Wno-ENUMVALUE -Wno-GENUNNAMED -O3 -sv \
4-
$(VFLAGS) \
5-
-CFLAGS "-std=c++17 -march=native" \
6-
-LDFLAGS "-ldl" \
6+
--cc --build --threads 4 --unroll-stmts 999999 -unroll-count 999999 --assert -Wall \
7+
-Wno-BLKSEQ -Wno-UNUSED -Wno-PINCONNECTEMPTY -Wno-DECLFILENAME -Wno-ENUMVALUE \
8+
$(SUPPORTS_GENUNNAMED) \
9+
-O3 -sv \
10+
$(VFLAGS) \
11+
-CFLAGS "-std=c++17 -march=native" \
12+
-LDFLAGS "-ldl" \
713
-MAKEFLAGS -j$(nproc) \
814
-CFLAGS -DNOKONATA \
915
-CFLAGS -DCOSIM \

0 commit comments

Comments
 (0)