Build toolchain failure for swift-5.6.1-RELEASE on M1 Max OSX 12.0.1

I use the build-toolchain, and because my computer is M1 chip, so I edit the mixin_osx_package_base preset and change cross-compile-hosts=macosx-arm64 to cross-compile-hosts=macosx-x86_64, but I get the error:

Undefined symbols for architecture arm64:
  "llvm::cl::Option::anchor()", referenced from:
      vtable for llvm::cl::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > in swift-demangle-yamldump.cpp.o
  "vtable for llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >", referenced from:
      __GLOBAL__sub_I_swift_demangle_yamldump.cpp in swift-demangle-yamldump.cpp.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  "llvm::SmallVectorBase<unsigned int>::grow_pod(void*, unsigned long, unsigned long)", referenced from:
      llvm::cl::Option::Option(llvm::cl::NumOccurrencesFlag, llvm::cl::OptionHidden) in swift-demangle-yamldump.cpp.o
  "llvm::StringRef::find_first_not_of(llvm::StringRef, unsigned long) const", referenced from:
      llvm::yaml::isNumeric(llvm::StringRef) in swift-demangle-yamldump.cpp.o
  "llvm::StringRef::find_first_of(llvm::StringRef, unsigned long) const", referenced from:
      llvm::yaml::needsQuotes(llvm::StringRef) in swift-demangle-yamldump.cpp.o