Ramy Medhat | ec8b8df | 2019-07-17 12:28:40 +0000 | [diff] [blame] | 1 | # |
| 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. |
| 18 | ifneq ($(filter-out false,$(USE_RBE)),) |
| 19 | ifdef RBE_DIR |
| 20 | rbe_dir := $(RBE_DIR) |
| 21 | else |
| 22 | rbe_dir := $(HOME)/rbe |
| 23 | endif |
Ramy Medhat | e8de093 | 2019-08-27 19:18:25 -0400 | [diff] [blame] | 24 | RBE_WRAPPER := $(rbe_dir)/rewrapper --labels=type=compile,lang=cpp,compiler=clang --env_var_whitelist=PWD |
Ramy Medhat | ec8b8df | 2019-07-17 12:28:40 +0000 | [diff] [blame] | 25 | |
| 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 := |
| 32 | endif |