-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get build info from mmtk-core (#174)
- Loading branch information
Showing
9 changed files
with
256 additions
and
8 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,3 @@ | ||
fn main() { | ||
built::write_built_file().expect("Failed to acquire build-time information"); | ||
} |
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,18 @@ | ||
mod raw { | ||
// The include imports a full list of the constants in built.rs from https://docs.rs/built/latest/built/index.html | ||
include!(concat!(env!("OUT_DIR"), "/built.rs")); | ||
} | ||
|
||
lazy_static! { | ||
// Owned string for the binding version, such as MMTk OpenJDK 0.14.0 (cfc755f-dirty) | ||
static ref BINDING_VERSION_STRING: String = match (raw::GIT_COMMIT_HASH, raw::GIT_DIRTY) { | ||
(Some(hash), Some(dirty)) => format!("MMTk OpenJDK {} ({}{})", raw::PKG_VERSION, hash.split_at(7).0, if dirty { "-dirty" } else { "" }), | ||
(Some(hash), None) => format!("MMTk OpenJDK {} ({}{})", raw::PKG_VERSION, hash.split_at(7).0, "-?"), | ||
_ => format!("MMTk OpenJDK {}", raw::PKG_VERSION), | ||
}; | ||
// Owned string for both binding and core version. | ||
static ref MMTK_OPENJDK_FULL_VERSION_STRING: String = format!("{}, using {}", *BINDING_VERSION_STRING, *mmtk::build_info::MMTK_FULL_BUILD_INFO); | ||
|
||
// Exposed &str for the full version. | ||
pub static ref MMTK_OPENJDK_FULL_VERSION: &'static str = &MMTK_OPENJDK_FULL_VERSION_STRING; | ||
} |
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
Oops, something went wrong.