Use build fingerprint and compile command for caching.
If either of those have changed, we need to invalidate the
compiled bit code.
Change-Id: I9b5cdc19e29237dc7fb2ec1627a167f3f8987702
diff --git a/tools/bcc/Main.cpp b/tools/bcc/Main.cpp
index 02860fe..beaf6c4 100644
--- a/tools/bcc/Main.cpp
+++ b/tools/bcc/Main.cpp
@@ -157,6 +157,7 @@
int main(int argc, char **argv) {
llvm::cl::SetVersionPrinter(BCCVersionPrinter);
llvm::cl::ParseCommandLineOptions(argc, argv);
+ std::string commandLine = bcc::getCommandLine(argc, argv);
init::Initialize();
BCCContext context;
@@ -193,9 +194,9 @@
rscdi(&RSCD);
}
- bool built = RSCD.build(context, OptOutputPath.c_str(),
- OptOutputFilename.c_str(), bitcode, bitcodeSize,
- OptBCLibFilename.c_str(), NULL, OptEmitLLVM);
+ bool built = RSCD.build(context, OptOutputPath.c_str(), OptOutputFilename.c_str(), bitcode,
+ bitcodeSize, commandLine.c_str(), OptBCLibFilename.c_str(), NULL,
+ OptEmitLLVM);
if (!built) {
return EXIT_FAILURE;