Port r198087 and r198089 (strip dead code by default) from make to cmake.