If Cocos2d-x v4 is deciding at compile time whether to include OpenGL or Metal, then that is, IMHO, a serious oversight.
It’s not like developers can have multiple versions of their app on the AppStore, one for metal and another for OpenGL, since that, at the very least, would be confusing to users, who wouldn’t have the slightest idea which to choose. This would also cause issues with app rankings on the store, and I can imagine a lot of other problems associated with that too. Also, if I recall correctly, Apple had issues with allowing the same app on the store under a different name, but this may no longer be the case.
The decision of the game engine using Metal or OpenGL should have been done at run-time, and if that isn’t possible, then the Cocos2d-x team should consider adding support for this. The check should be based on the iOS version, since that seems to be the safest to use.