]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
check lto compilation status
authorJohn Ravi <jjravi@ncsu.edu>
Mon, 24 Aug 2020 02:35:35 +0000 (19:35 -0700)
committerJohn Ravi <jjravi@ncsu.edu>
Mon, 24 Aug 2020 02:35:35 +0000 (19:35 -0700)
gcc/lto-wrapper.c
gcc/mapper-resolver.cc

index 15261b0d33a233d14674b1ba1374a68d596b7b3f..60ed3192c86d1ad1640c2708994523dcf8bf7e18 100644 (file)
@@ -1982,7 +1982,26 @@ cont:
           arg_it++;
         }
         ////fprintf(stderr, "\n");
-        mapper->Uncork();
+        auto response = mapper->Uncork();
+        auto r_iter = response.begin ();
+
+        while(r_iter != response.end()) {
+          Cody::Packet const &p = *r_iter;
+
+          if(p.GetCode() == Cody::Client::PC_LTO_COMPILED) {
+            if(strcmp(p.GetString().c_str(), "success") == 0) {
+              // fprintf(stderr, "\tlto compilation succeeded\n");
+            }
+            else {
+              fprintf(stderr, "\tlto compilation failure message: %s\n", p.GetString().c_str());
+            }
+          }
+          else {
+            fprintf(stderr, "\tlto compilation unknown failure\n");
+          }
+
+          ++r_iter;
+        }
 
         //fprintf(stderr, "\tRAVI PRINT: %s\n", new_argv[0]);
              //fork_execute (new_argv[0], CONST_CAST (char **, new_argv),
index 4a84d647b8751e38ba8b3cad32d0c7692d355a44..35de17d1db20b19e89e0832105c10807812b0c57 100644 (file)
@@ -265,7 +265,7 @@ int module_resolver::LTOCompileRequest (Cody::Server *s, std::vector<std::string
   fork_execute (new_argv[0], new_argv, true);
 
   // TODO: send back a compile status response
-  //s->LTOResponse();
+  s->LTOResponse("success");
   return 0;
 }