2017-10-03 05:00:41 +08:00
|
|
|
//===- lib/Common/Version.cpp - LLD Version Number ---------------*- C++-=====//
|
2014-10-08 11:47:51 +08:00
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2014-10-08 11:47:51 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file defines several version-related utility functions for LLD.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2017-10-03 05:00:41 +08:00
|
|
|
#include "lld/Common/Version.h"
|
2014-10-08 11:47:51 +08:00
|
|
|
|
2019-02-22 02:37:26 +08:00
|
|
|
#include "VCSVersion.inc"
|
2014-10-08 11:47:51 +08:00
|
|
|
|
2019-02-22 02:37:26 +08:00
|
|
|
// Returns a version string, e.g.:
|
2021-08-05 04:04:10 +08:00
|
|
|
// LLD 14.0.0 (https://github.com/llvm/llvm-project.git
|
|
|
|
// 2d9759c7902c5cbc9a7e3ab623321d5578d51687)
|
2016-10-26 11:52:06 +08:00
|
|
|
std::string lld::getLLDVersion() {
|
2020-05-12 06:33:55 +08:00
|
|
|
#ifdef LLD_VENDOR
|
|
|
|
#define LLD_VENDOR_DISPLAY LLD_VENDOR " "
|
|
|
|
#else
|
|
|
|
#define LLD_VENDOR_DISPLAY
|
|
|
|
#endif
|
|
|
|
return LLD_VENDOR_DISPLAY "LLD " LLD_VERSION_STRING;
|
|
|
|
#undef LLD_VENDOR_DISPLAY
|
2016-10-26 11:52:06 +08:00
|
|
|
}
|