  We compute the elliptic genus of abelian 2d (0,2) gauge theories
corresponding to brane brick models. These theories are worldvolume theories on
a single D1-brane probing a toric Calabi-Yau 4-fold singularity. We identify a
match with the elliptic genus of the non-linear sigma model on the same
Calabi-Yau background, which is computed using a new localization formula. The
matching implies that the quantum effects do not drastically alter the
correspondence between the geometry and the 2d (0,2) gauge theory. In theories
whose matter sector suffers from abelian gauge anomaly, we propose an ansatz
for an anomaly cancelling term in the integral formula for the elliptic genus.
We provide an example in which two brane brick models related to each other by
Gadde-Gukov-Putrov triality give the same elliptic genus.
