summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrCompiler.cpp20
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrCompiler.h1
2 files changed, 21 insertions, 0 deletions
diff --git a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp b/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp
index ee10605edb..bb2df3ed39 100644
--- a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp
@@ -96,6 +96,10 @@ CVfrCompiler::OptionInitialization (
Usage ();
SET_RUN_STATUS (STATUS_DEAD);
return;
+ } else if (stricmp(Argv[Index], "--version") == 0) {
+ Version ();
+ SET_RUN_STATUS (STATUS_DEAD);
+ return;
} else if (stricmp(Argv[Index], "-l") == 0) {
mOptions.CreateRecordListFile = TRUE;
gCIfrRecordInfoDB.TurnOn ();
@@ -415,6 +419,7 @@ CVfrCompiler::Usage (
" ",
"Options:",
" -h, --help prints this help",
+ " --version prints version info",
" -l create an output IFR listing file",
" -o DIR, --output-directory DIR",
" deposit all output files to directory OutputDir",
@@ -439,6 +444,21 @@ CVfrCompiler::Usage (
}
}
+VOID
+CVfrCompiler::Version (
+ VOID
+ )
+{
+ UINT32 Index;
+ CONST CHAR8 *Help[] = {
+ "VfrCompile version " VFR_COMPILER_VERSION __BUILD_VERSION,
+ NULL
+ };
+ for (Index = 0; Help[Index] != NULL; Index++) {
+ fprintf (stdout, "%s\n", Help[Index]);
+ }
+}
+
VOID
CVfrCompiler::PreProcess (
VOID
diff --git a/BaseTools/Source/C/VfrCompile/VfrCompiler.h b/BaseTools/Source/C/VfrCompile/VfrCompiler.h
index 3261e9ccdb..6a6779c0ca 100644
--- a/BaseTools/Source/C/VfrCompile/VfrCompiler.h
+++ b/BaseTools/Source/C/VfrCompile/VfrCompiler.h
@@ -100,6 +100,7 @@ public:
~CVfrCompiler ();
VOID Usage (VOID);
+ VOID Version (VOID);
VOID PreProcess (VOID);
VOID Compile (VOID);