blob: 231859bd993b3785d552c1ec46670708575e0ba7 [file] [log] [blame]
Ramy Medhatec8b8df2019-07-17 12:28:40 +00001#
2# Copyright (C) 2019 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17# Notice: this works only with Google's RBE service.
18ifneq ($(filter-out false,$(USE_RBE)),)
19 ifdef RBE_DIR
20 rbe_dir := $(RBE_DIR)
21 else
22 rbe_dir := $(HOME)/rbe
23 endif
Ramy Medhate8de0932019-08-27 19:18:25 -040024 RBE_WRAPPER := $(rbe_dir)/rewrapper --labels=type=compile,lang=cpp,compiler=clang --env_var_whitelist=PWD
Ramy Medhatec8b8df2019-07-17 12:28:40 +000025
26 # Append rewrapper to existing *_WRAPPER variables so it's possible to
27 # use both ccache and rewrapper.
28 CC_WRAPPER := $(strip $(CC_WRAPPER) $(RBE_WRAPPER))
29 CXX_WRAPPER := $(strip $(CXX_WRAPPER) $(RBE_WRAPPER))
30
31 rbe_dir :=
32endif