Cannot build iOS benchmark app

I’m closely following the instructions here, but hit this error in Xcode 12.2 when trying to run the app on iPhone XR (iOS 14.2):

/Users/wind/Desktop/project-src/pytorch/build_ios/install/lib/libXNNPACK.a(1x8inc-minmax-aarch64-neonfp16arith-ld64.S.o), building for iOS, but linking in object file built for macOS, file ‘/Users/wind/Desktop/project-src/pytorch/build_ios/install/lib/libXNNPACK.a’ for architecture arm64

Looks like wrong library is built. Anybody has any idea what needs to be changed?