-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
solidity: rename the revive metadata (#106)
Rename the revive metadata fields and includes the commit hash and LLVM version in the revive version (similar to what solc does). Signed-off-by: xermicus <[email protected]>
- Loading branch information
Showing
9 changed files
with
56 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//! The resolc compiler version. | ||
|
||
use serde::Deserialize; | ||
use serde::Serialize; | ||
|
||
/// The resolc compiler version. | ||
#[derive(Debug, Serialize, Deserialize, Clone)] | ||
pub struct Version { | ||
/// The long version string. | ||
pub long: String, | ||
/// The short `semver`. | ||
pub default: semver::Version, | ||
/// The LLVM version string. | ||
pub llvm: semver::Version, | ||
} | ||
|
||
impl Default for Version { | ||
fn default() -> Self { | ||
let default = semver::Version::parse(env!("CARGO_PKG_VERSION")).expect("Always valid"); | ||
let commit = env!("GIT_COMMIT_HASH"); | ||
let (llvm_major, llvm_minor, llvm_patch) = inkwell::support::get_llvm_version(); | ||
let llvm = semver::Version::new(llvm_major as u64, llvm_minor as u64, llvm_patch as u64); | ||
|
||
Self { | ||
long: format!("{default}+commit.{commit}.llvm-{llvm}"), | ||
default, | ||
llvm, | ||
} | ||
} | ||
} |