generate caffe2/core/macros.h in shared build structure (#98131)
This is only used by Bazel for now.
Differential Revision: [D44604078](https://our.internmc.facebook.com/intern/diff/D44604078/)
**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D44604078/)!
Pull Request resolved: https://github.com/pytorch/pytorch/pull/98131
Approved by: https://github.com/ezyang, https://github.com/PaliC