We introduce a singularity-aware design optimization method for spatial multi-degree-of-freedom mechanical linkages. At the core of our approach is an adversarial sampling strategy, which actively detects singular configurations within the targeted operation range. The detection of singularities in both forward and inverse kinematics allows for two-way bijective mappings between input and output trajectories on our optimized designs, thus enabling robust control. We demonstrate our approach on a set of simulation examples and provide additional validation on physical prototypes.