swift
115c2b65 - [build-script] Point swifttestingmacros' SwiftSyntax_DIR at unified LLVM tree

Commit
61 days ago
[build-script] Point swifttestingmacros' SwiftSyntax_DIR at unified LLVM tree `swift_testing_macros.py` builds a shim CMake project that `find_package`s SwiftSyntax to link the compiler plugin. It computes `SwiftSyntax_DIR = <build_root>/swift-<host>/cmake/modules`, which is where the standalone swift build drops `SwiftSyntaxConfig.cmake`. Under the unified LLVM+Swift+LLDB layout the standalone swift build is skipped, so that path no longer exists and configure fails with: -- Could NOT find SwiftSyntax (missing: SwiftSyntax_DIR) CMake Error at CMakeLists.txt:122 (target_link_libraries): Target "TestingMacros" links to: SwiftSyntax::SwiftSyntax but the target was not found. The same file is generated by the swift external project inside the LLVM tree at `llvm-<host>/cmake/modules/SwiftSyntaxConfig.cmake` and resolves its `IMPORTED_LOCATION_RELEASE`s to `llvm-<host>/lib/swift/host/libSwift*.dylib`, which already exist. When Swift.is_unified_llvm_build(args) is true, point SwiftSyntax_DIR at the LLVM tree instead. Verified locally by cleaning `swifttestingmacros-<host>/` and re-running the unified preset: swifttestingmacros configures against the LLVM-tree SwiftSyntax, builds, installs, and the subsequent swifttesting/llbuild/swiftpm stages proceed.
Author
Committer
Parents
Loading