move codegen binary to the common build system (#74470)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74470
Internally, use it as well.
ghstack-source-id: 152438657
Test Plan: Rely on CI to validate.
Reviewed By: malfet
Differential Revision: D35011144
fbshipit-source-id: fb7247470df579ae23fcbc74bd2f8d6cc55cf657
(cherry picked from commit d9b476e2507807097a59c0b0a5ddf029d8dc0ab3)