disable custom class logic for mobile build to avoid rtti (#24994)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/24994
Use C10_MOBILE to gate CustomClass lookup logic for mobile build, which uses
typeid() and requires "-frtti" which is off by default for internal mobile build.
Not sure whether we ever need CustomClass for internal use cases. Feel the change
is not too intrusive - but I'm willing to hear others' thoughts.
ghstack-source-id: 88754932
Reviewed By: dreiss
Differential Revision: D16951430
fbshipit-source-id: 445f47ee4e9c16260e2fd2c43f5684cea602e3d9