fix the out of tree building for proxy/shared