A photoluminescent chiral lead-free hybrid ferroelastic semiconductor with switchable second-harmonic generation.