File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ swift_cc_binary(
1414 "//swift/extractor/remapping" ,
1515 "//swift/extractor/translators" ,
1616 "//swift/third_party/swift-llvm-support" ,
17- "@picosha2" ,
1817 ],
1918)
2019
Original file line number Diff line number Diff line change 55#include < iostream>
66#include < regex>
77#include < unistd.h>
8- #include < picosha2.h >
8+ #include < chrono >
99
1010#include < swift/Basic/LLVMInitialize.h>
1111#include < swift/FrontendTool/FrontendTool.h>
@@ -107,12 +107,8 @@ static void checkWhetherToRunUnderTool(int argc, char* const* argv) {
107107// Creates a target file that should store per-invocation info, e.g. compilation args,
108108// compilations, diagnostics, etc.
109109codeql::TargetFile invocationTargetFile (codeql::SwiftExtractorConfiguration& configuration) {
110- auto hasher = picosha2::hash256_one_by_one ();
111- for (auto & option : configuration.frontendOptions ) {
112- hasher.process (option.c_str (), option.c_str () + option.size () + 1 );
113- }
114- hasher.finish ();
115- auto target = " invocation-" s + get_hash_hex_string (hasher);
110+ auto timestamp = std::chrono::system_clock::now ().time_since_epoch ().count ();
111+ auto target = " invocation-" s + std::to_string (timestamp) + ' -' + std::to_string (getpid ());
116112 auto maybeFile = codeql::createTargetTrapFile (configuration, target);
117113 if (!maybeFile) {
118114 std::cerr << " Cannot create invocation trap file: " << target << " \n " ;
You can’t perform that action at this time.
0 commit comments