mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This PR adds a SWIFT_APPEND_VC_REV Cmake option (in symmetry with LLVM's LLVM_APPEND_VC_REV). When enabled, lib/Basic/SwiftRevision.inc header contains git commit hash and repository information, e.g. #define SWIFT_REVISION "ed4cef9b839d4a87618758d8b8705ab66b61917f" #define SWIFT_REPOSITORY "https://github.com/scentini/swift.git" This is useful for keeping track of the VCS state that produced a binary. But for local development builds, this information is often ignored and since this file is invalidated by every git commit or git checkout command and it leads to long rebuilds, it's useful to have a switch to disable this behavior. When SWIFT_APPEND_VC_REV is disabled, lib/Basic/SwiftRevision.inc contains: #undef SWIFT_REVISION #undef SWIFT_REPOSITORY