[Stuck Newbie Needs Help] Can't generate Xcode project

Newbie here, trying to compile @apple/swift and play around with it using Xcode.

I'm stuck.

With ninja, everything builds successfully, and all the tests succeed.

But every time I try to generate the Xcode project with

utils/build-script --xcode

or similar commands, I get an error like

CMake Error in SwiftCompilerSources/CMakeLists.txt:
  The custom command generating


  is attached to multiple targets:


  but none of these is a common dependency of the other(s).  This is not
  allowed by the Xcode "new build system".

(which is super annoying especially after hours of building, by the way, :sweat_smile:).

  • I've tried both Xcode 13.4.1 and Xcode 13 beta 4, same error.
  • I've tried utils/build-script --skip-build --xcode --skip-early-swift-driver, same error.
  • I've tried
    utils/build-script --skip-build-benchmarks \
      --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "$(uname -m)" \
      --sccache --release-debuginfo --swift-disable-dead-stripping --test \
    , same error.

I also opened an issue on GitHub #60033 where you can find more details about my machine, hashes, and the full output.

Thank you in advance!

Delete all the build/Xcode-* directories and try this again:

utils/build-script --skip-build-benchmarks --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "$(uname -m)" --swift-disable-dead-stripping --release-debuginfo --xcode --skip-build

Thank you much! :)

1 Like