Allow enabling or disabling specific classes (which will not be built). (cherry picked from commit 1186c488bd)
1186c488bd