When does building armor pen. become more cost-effective than building attack damage?
Solution 1:
I think the other posts pretty much sums it up, it is really situational. I found this which is in an in depth comparison between last whipser and black cleaver.
Copying the tl;dr from the linked article: Everything in League of Legends is situational. Neither Last Whisper nor The Black Cleaver is superior to either in all situations; learn to think analytically and determine in what situations one will do more damage than the other.
Edit: Link contains hard math, result is still "it depends". The lower armor and longer engages the better black cleaver turns out and of course vice versa.
Solution 2:
Two things that weren't mentioned is your team composition and the use of abilities in teamfights. Black Cleaver provides 0 armor penetration on the target. Rather it provides an armor reduction debuff on the target that stacks. This means if your team is AD heavy (solo top lane is AD like Riven, Garen, or GP) then having Black Cleaver as a Ranged AD Carry allows you to "tag" the target with the debuff allowing yourself and your AD bruiser to do more damage. Last Whisper on the other hand only affects what you see for the target's armor, their actual armor number is unchanged for everyone else. Also it is effective for your autoattacks as well as your abilities. So for instance if you are trying to poke each other before a full on teamfight starts using abilities like Ashe Volley, Caitlyn's Piltover Peacemaker, etc. Your abilities will have the full effect of a Last Whisper but zero effect of the Black Cleaver debuff, since most abilities do not provide on-hit effects for Ranged AD carries.