  There are still debates regarding the mechanisms that lead to hot cracking in
parts build by additive manufacturing (AM) of non-weldable Ni-based
superalloys. This lack of in-depth understanding of the root causes of hot
cracking is an impediment to designing engineering parts for safety-critical
applications. Here, we deploy a near-atomic-scale approach to investigate the
details of the compositional decoration of grain boundaries in the
coarse-grained, columnar microstructure in parts built from a non-weldable
Ni-based superalloy by selective electron-beam melting. The progressive
enrichment in Cr, Mo and B at grain boundaries over the course of the
AM-typical successive solidification and remelting events, accompanied by
solid-state diffusion, causes grain boundary segregation induced liquation.
This observation is consistent with thermodynamic calculations. We demonstrate
that by adjusting build parameters to obtain a fine-grained equiaxed or a
columnar microstructure with grain width smaller than 100 $\mu$m enables to
avoid cracking, despite strong grain boundary segregation. We find that the
spread of critical solutes to a higher total interfacial area, combined with
lower thermal stresses, helps to suppress interfacial liquation.
