Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0118dd2f authored by Kousik Kumar's avatar Kousik Kumar
Browse files

Add RBE_CXX_COMPARE variable to locally disable compare mode for C++

When we do 64-32 migration, we want compare mode to be present only for
non-c++ actions as it would impact performance on 32-core machines
otherwise.

Bug: b/157414300
Test: Ran a build with "RBE_CXX_LINKS="true" RBE_CXX_LINKS_EXEC_STRATEGY="remote" RBE_CXX_COMPARE="false" RBE_compare="true" use_rbe mmma bionic"
and observed that local-executions happened only for link actions and
not for C++ actions.

Change-Id: Ia972c74d804085196a7b6ec755af63042c6b3909
Merged-In: Ia972c74d804085196a7b6ec755af63042c6b3909
parent 83c95dea
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -28,6 +28,12 @@ ifneq ($(filter-out false,$(USE_RBE)),)
    cxx_rbe_exec_strategy := "local"
    cxx_rbe_exec_strategy := "local"
  endif
  endif


  ifdef RBE_CXX_COMPARE
    cxx_compare := $(RBE_CXX_COMPARE)
  else
    cxx_compare := "false"
  endif

  ifdef RBE_JAVAC_EXEC_STRATEGY
  ifdef RBE_JAVAC_EXEC_STRATEGY
    javac_exec_strategy := $(RBE_JAVAC_EXEC_STRATEGY)
    javac_exec_strategy := $(RBE_JAVAC_EXEC_STRATEGY)
  else
  else
@@ -51,7 +57,7 @@ ifneq ($(filter-out false,$(USE_RBE)),)
  java_r8_d8_platform := $(platform)",Pool=java16"
  java_r8_d8_platform := $(platform)",Pool=java16"


  RBE_WRAPPER := $(rbe_dir)/rewrapper
  RBE_WRAPPER := $(rbe_dir)/rewrapper
  RBE_CXX := --labels=type=compile,lang=cpp,compiler=clang --env_var_whitelist=PWD --exec_strategy=$(cxx_rbe_exec_strategy) --platform="$(cxx_platform)"
  RBE_CXX := --labels=type=compile,lang=cpp,compiler=clang --env_var_whitelist=PWD --exec_strategy=$(cxx_rbe_exec_strategy) --platform="$(cxx_platform)" --compare="$(cxx_compare)"


  # Append rewrapper to existing *_WRAPPER variables so it's possible to
  # Append rewrapper to existing *_WRAPPER variables so it's possible to
  # use both ccache and rewrapper.
  # use both ccache and rewrapper.