PortalKit: remove the redundant code from build