[go: nahoru, domu]

Reland "orderfile: add use_remoteexec support"

This reverts commit be63a36d0a4944d30c1b137f48a36cf863179c47.

Reason for revert: 
fix Faulse -> False

Original change's description:
> Revert "orderfile: add use_remoteexec support"
>
> This reverts commit 2a208d8ff6d3719bb7ee88d44d4c340419e689f4.
>
> Reason for revert: https://ci.chromium.org/ui/p/chrome/builders/ci/orderfile-clankium/19844/overview 
> Typo in Faulse -> False
>
> Original change's description:
> > orderfile: add use_remoteexec support
> >
> > Bug: b/236070141
> > Change-Id: I16c1e0402f5edaec5088c58634114ebfc38c4f39
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3977272
> > Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
> > Reviewed-by: Benoit Lize <lizeb@chromium.org>
> > Commit-Queue: Fumitoshi Ukai <ukai@google.com>
> > Cr-Commit-Position: refs/heads/main@{#1064656}
>
> Bug: b/236070141
> Change-Id: Ibf30fb648108ae35301e421040c0023b873de4c4
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3990585
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Susanne Westphal <swestphal@chromium.org>
> Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
> Commit-Queue: Susanne Westphal <swestphal@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1064764}

Bug: b/236070141
Change-Id: I6f0b0ce2388b4ba8cd3f40ade5b7d81a6ce9a826
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3990803
Reviewed-by: Benoit Lize <lizeb@chromium.org>
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Benoit Lize <lizeb@chromium.org>
Reviewed-by: Susanne Westphal <swestphal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1064808}
diff --git a/tools/cygprofile/orderfile_generator_backend.py b/tools/cygprofile/orderfile_generator_backend.py
index 52ccaa5..17abc57 100755
--- a/tools/cygprofile/orderfile_generator_backend.py
+++ b/tools/cygprofile/orderfile_generator_backend.py
@@ -238,12 +238,15 @@
   """Handles compilation of clank."""
 
   def __init__(self, out_dir, step_recorder, arch, use_goma, goma_dir,
-               system_health_profiling, monochrome, public, orderfile_location):
+               use_remoteexec, system_health_profiling, monochrome, public,
+               orderfile_location):
     self._out_dir = out_dir
     self._step_recorder = step_recorder
     self._arch = arch
+    # TODO(b/236070141): remove goma config.
     self._use_goma = use_goma
     self._goma_dir = goma_dir
+    self._use_remoteexec = use_remoteexec
     self._system_health_profiling = system_health_profiling
     self._public = public
     self._orderfile_location = orderfile_location
@@ -288,6 +291,7 @@
         'symbol_level=1',  # to fit 30 GiB RAM on the bot when LLD is running
         'target_os="android"',
         'use_goma=' + str(self._use_goma).lower(),
+        'use_remoteexec=' + str(self._use_remoteexec).lower(),
         'use_order_profiling=' + str(instrumented).lower(),
         'use_call_graph=' + str(use_call_graph).lower(),
     ]
@@ -903,6 +907,7 @@
       self._compiler = ClankCompiler(out_directory, self._step_recorder,
                                      self._options.arch, self._options.use_goma,
                                      self._options.goma_dir,
+                                     self._options.use_remoteexec,
                                      self._options.system_health_orderfile,
                                      self._monochrome, self._options.public,
                                      self._GetPathToOrderfile())
@@ -950,8 +955,8 @@
         self._compiler = ClankCompiler(
             self._instrumented_out_dir, self._step_recorder, self._options.arch,
             self._options.use_goma, self._options.goma_dir,
-            self._options.system_health_orderfile, self._monochrome,
-            self._options.public, self._GetPathToOrderfile())
+            self._options.use_remoteexec, self._options.system_health_orderfile,
+            self._monochrome, self._options.public, self._GetPathToOrderfile())
         if not self._options.pregenerated_profiles:
           # If there are pregenerated profiles, the instrumented build should
           # not be changed to avoid invalidating the pregenerated profile
@@ -988,8 +993,8 @@
         self._compiler = ClankCompiler(
             self._uninstrumented_out_dir, self._step_recorder,
             self._options.arch, self._options.use_goma, self._options.goma_dir,
-            self._options.system_health_orderfile, self._monochrome,
-            self._options.public, self._GetPathToOrderfile())
+            self._options.use_remoteexec, self._options.system_health_orderfile,
+            self._monochrome, self._options.public, self._GetPathToOrderfile())
 
         self._compiler.CompileLibchrome(instrumented=False,
                                         use_call_graph=False)
@@ -1072,6 +1077,10 @@
   parser.add_argument('--goma-dir', help='GOMA directory.')
   parser.add_argument(
       '--use-goma', action='store_true', help='Enable GOMA.', default=False)
+  parser.add_argument('--use-remoteexec',
+                      action='store_true',
+                      help='Enable remoteexec.',
+                      default=False)
   parser.add_argument('--adb-path', help='Path to the adb binary.')
 
   parser.add_argument('--public',