@@ -227,8 +227,11 @@ bb-acir: noir bb-cpp-native bb-ts
227227bb-docs :
228228 $(call build,$@ ,barretenberg/docs)
229229
230- # BB Solidity - Solidity verifier contracts
231- bb-sol : bb-cpp-native bb-crs
230+ # BB Solidity - Solidity verifier contracts.
231+ # Depends on l1-contracts-solc so that the foundry build uses the solc binary
232+ # pulled in by l1-contracts (see barretenberg/sol/foundry.toml) rather than
233+ # triggering a parallel svm download.
234+ bb-sol : bb-cpp-native bb-crs l1-contracts-solc
232235 $(call build,$@ ,barretenberg/sol)
233236
234237# ==============================================================================
@@ -309,8 +312,16 @@ noir-projects: noir-protocol-circuits mock-protocol-circuits noir-contracts azte
309312# L1 Contracts - Ethereum L1 smart contracts
310313# ==============================================================================
311314
315+ # l1-contracts-solc: Download (or cache-hit) the pinned solc binary.
316+ # This is the single owner of the svm download. Other forge projects
317+ # (barretenberg/sol, docs/examples/solidity) point their foundry.toml at the
318+ # same binary, so they must wait on this target before invoking forge build,
319+ # otherwise parallel forge invocations race on ~/.svm.
320+ l1-contracts-solc :
321+ $(call build,$@ ,l1-contracts,download_solc)
322+
312323# l1-contracts-src: Build all src/ contracts (fully independent!)
313- l1-contracts-src :
324+ l1-contracts-src : l1-contracts-solc
314325 $(call build,$@ ,l1-contracts,build_src)
315326
316327# l1-contracts-verifier: Build generated verifier and tests (depends on noir-protocol-circuits)
0 commit comments