[server side] Fix build for a platform more than once