Hey Everyone!
I am facing issues with the initial build (i.e. 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
after few recent pulls and have never faced such issue during my workflow.
I have tried out several ways to fixit, researched a lot to find any issues on my side, and after all this, to make my work a little easier I deleted the entire swift-project folder, starting everything from the beginning, i.e. re-cloning, resetting entire workspace, thinking it should probably fix the error in case there was an issue on my end, but it still throws the same error.
For more clarity, following is the error message:
CMake Error at /Users/rajveersingh/Desktop/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/lib/cmake/llvm/AddLLVM.cmake:960 (add_executable):
Error evaluating generator expression:
$<TARGET_OBJECTS:swiftRuntime-macosx-x86_64>
Objects of target "swiftRuntime-macosx-x86_64" referenced but no such
target exists.
Call Stack (most recent call first):
/Users/rajveersingh/Desktop/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/lib/cmake/llvm/AddLLVM.cmake:1576 (add_llvm_executable)
cmake/modules/AddSwiftUnittests.cmake:11 (add_unittest)
unittests/runtime/CMakeLists.txt:103 (add_swift_unittest)
CMake Error at /Users/rajveersingh/Desktop/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/lib/cmake/llvm/AddLLVM.cmake:960 (add_executable):
Error evaluating generator expression:
$<TARGET_OBJECTS:swiftRuntime-macosx-x86_64>
Objects of target "swiftRuntime-macosx-x86_64" referenced but no such
target exists.
Call Stack (most recent call first):
/Users/rajveersingh/Desktop/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/lib/cmake/llvm/AddLLVM.cmake:1576 (add_llvm_executable)
cmake/modules/AddSwiftUnittests.cmake:11 (add_unittest)
unittests/runtime/LongTests/CMakeLists.txt:37 (add_swift_unittest)
CMake Error at /Users/rajveersingh/Desktop/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/lib/cmake/llvm/AddLLVM.cmake:960 (add_executable):
Error evaluating generator expression:
$<TARGET_OBJECTS:swiftRuntime-macosx-x86_64>
Objects of target "swiftRuntime-macosx-x86_64" referenced but no such
target exists.
Call Stack (most recent call first):
/Users/rajveersingh/Desktop/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/lib/cmake/llvm/AddLLVM.cmake:1576 (add_llvm_executable)
cmake/modules/AddSwiftUnittests.cmake:11 (add_unittest)
unittests/runtime/CMakeLists.txt:103 (add_swift_unittest)
CMake Error at /Users/rajveersingh/Desktop/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/lib/cmake/llvm/AddLLVM.cmake:960 (add_executable):
Error evaluating generator expression:
$<TARGET_OBJECTS:swiftRuntime-macosx-x86_64>
Objects of target "swiftRuntime-macosx-x86_64" referenced but no such
target exists.
Call Stack (most recent call first):
/Users/rajveersingh/Desktop/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/lib/cmake/llvm/AddLLVM.cmake:1576 (add_llvm_executable)
cmake/modules/AddSwiftUnittests.cmake:11 (add_unittest)
unittests/runtime/LongTests/CMakeLists.txt:37 (add_swift_unittest)
CMake Error at /Users/rajveersingh/Desktop/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/lib/cmake/llvm/AddLLVM.cmake:960 (add_executable):
Error evaluating generator expression:
$<TARGET_OBJECTS:swiftRuntime-macosx-x86_64>
Objects of target "swiftRuntime-macosx-x86_64" referenced but no such
target exists.
Call Stack (most recent call first):
/Users/rajveersingh/Desktop/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/lib/cmake/llvm/AddLLVM.cmake:1576 (add_llvm_executable)
cmake/modules/AddSwiftUnittests.cmake:11 (add_unittest)
unittests/runtime/CMakeLists.txt:103 (add_swift_unittest)
CMake Error at /Users/rajveersingh/Desktop/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/lib/cmake/llvm/AddLLVM.cmake:960 (add_executable):
Error evaluating generator expression:
$<TARGET_OBJECTS:swiftRuntime-macosx-x86_64>
Objects of target "swiftRuntime-macosx-x86_64" referenced but no such
target exists.
Call Stack (most recent call first):
/Users/rajveersingh/Desktop/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/lib/cmake/llvm/AddLLVM.cmake:1576 (add_llvm_executable)
cmake/modules/AddSwiftUnittests.cmake:11 (add_unittest)
unittests/runtime/LongTests/CMakeLists.txt:37 (add_swift_unittest)
CMake Error at /Users/rajveersingh/Desktop/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/lib/cmake/llvm/AddLLVM.cmake:960 (add_executable):
No SOURCES given to target: SwiftRuntimeTests
Call Stack (most recent call first):
/Users/rajveersingh/Desktop/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/lib/cmake/llvm/AddLLVM.cmake:1576 (add_llvm_executable)
cmake/modules/AddSwiftUnittests.cmake:11 (add_unittest)
unittests/runtime/CMakeLists.txt:103 (add_swift_unittest)
CMake Error at /Users/rajveersingh/Desktop/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/lib/cmake/llvm/AddLLVM.cmake:960 (add_executable):
No SOURCES given to target: SwiftRuntimeLongTests
Call Stack (most recent call first):
/Users/rajveersingh/Desktop/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/lib/cmake/llvm/AddLLVM.cmake:1576 (add_llvm_executable)
cmake/modules/AddSwiftUnittests.cmake:11 (add_unittest)
unittests/runtime/LongTests/CMakeLists.txt:37 (add_swift_unittest)
CMake Generate step failed. Build files cannot be regenerated correctly.
ERROR: command terminated with a non-zero exit status 1, aborting