Build optimizations

Coauthor: Antigravity
This commit is contained in:
2026-06-05 22:23:23 -07:00
parent be0350dfe7
commit eb91af45a1
+10 -3
View File
@@ -2,6 +2,13 @@
LOG_REDIR = >&
TIME=/usr/bin/time --format "Elapsed: %E, Memory: %M KB [Swaps %W]"
# Enable ccache for Verilator compilation
export OBJCACHE = ccache
export CXX = clang++
export CC = clang
export OPT_FAST = -O1
export OPT_SLOW = -O0
# Makefile variables
# Use as many threads as possible while keeping 2 for IO, browsing, etc.
# USE_PROCS = $(( $(shell nproc --all) - 2 ))
@@ -82,7 +89,7 @@ prepare_area:
@if [ ! -d $(PROJ_BASE)/logs ]; then mkdir -p $(PROJ_BASE)/logs; fi
#
# C code generation from SystemVerilog
# C code generation from SystemVerilog (optional translation/lint)
#
build_sv: prepare_area $(SV_OUT)
@@ -98,9 +105,9 @@ $(SV_OUT): $(PROJ_BASE)/logs $(SV_DEPS)
#
# C code build to generate testbench executable
#
build_cpp: build_sv $(CPP_OUT)
build_cpp: prepare_area $(CPP_OUT)
$(CPP_OUT): $(SV_OUT)
$(CPP_OUT): $(SV_DEPS)
$(info #-------------------------)
$(info # Building CPP ($(USE_PROCS) threads))
$(info #-------------------------)