From d976d3166cf393f3440216b891db88fe1d895e52 Mon Sep 17 00:00:00 2001 From: Robert Widmann Date: Tue, 29 Nov 2022 13:31:59 -0700 Subject: [PATCH] Forward SWIFT_COMPILER_VERSION This is set on a per-file basis and was not forwarded when https://github.com/apple/swift/pull/61014 was integrated. This is a short-term fix for this issue. I don't see a reason this version number should be applied to individual files instead of being passed as an argument to every translation unit. rdar://102731783 --- lib/Parse/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Parse/CMakeLists.txt b/lib/Parse/CMakeLists.txt index f7ca9b61f9f9b..f48eebf993067 100644 --- a/lib/Parse/CMakeLists.txt +++ b/lib/Parse/CMakeLists.txt @@ -74,4 +74,9 @@ if (SWIFT_SWIFT_PARSER) ) endif() +if(SWIFT_COMPILER_VERSION) + set_property(SOURCE ParseVersion.cpp APPEND_STRING PROPERTY COMPILE_FLAGS + " -DSWIFT_COMPILER_VERSION=\"\\\"${SWIFT_COMPILER_VERSION}\\\"\"") +endif() + set_swift_llvm_is_available(swiftParse)