Swift build-script fails with error Unknown target name: "begin_borrow"

I am building from master running ./swift/utils/build-script -R -T -B.
I have following error. Actually a warning which is treated as error.

Warning, treated as error:
/Users/***/Apple/swift/docs/SIL.rst:1743:Unknown target name: "begin_borrow".
[290/1654][ 17%][66.436s] Building CXX object lib/AST/CMakeFiles/swiftAST.dir/ASTContext.cpp.o
ninja: build stopped: subcommand failed.
ERROR: command terminated with a non-zero exit status 1, aborting

I did run ./swift/utils/update-checkout --clone-with-ssh before so all branches of all repos are fresh.
I did try run build-script with --restructure, did try removing build folder completely.
Still having same error.


  • how to get rid of this error?
  • is there any way not to treat warnings as errors?
  • error seems to be connected to building documentation. Any way to tell build script skip this?

Thanks for helping.

Valeriy Van

Looks like this is caused by https://github.com/apple/swift/pull/32808. There isn’t a section on begin_borrow in the doc hence the warning. cc @Michael_Gottesman

I suppose in the meantime you can probably just fix it locally by doing something like this.

Just patch it out for now. I guess you mean --reconfigure, there's no --restructure flag.

This PR should fix the issue: https://github.com/apple/swift/pull/32924

Thanks! Sorry for the breakage!

Terms of Service

Privacy Policy

Cookie Policy