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 | a9cc25d | 2020-01-27 14:21:24 -0500 | [diff] [blame^] | 24 | RBE_WRAPPER := $(rbe_dir)/rewrapper |
| 25 | RBE_CXX := --labels=type=compile,lang=cpp,compiler=clang --env_var_whitelist=PWD |
Ramy Medhat | ec8b8df | 2019-07-17 12:28:40 +0000 | [diff] [blame] | 26 | |
| 27 | # Append rewrapper to existing *_WRAPPER variables so it's possible to |
| 28 | # use both ccache and rewrapper. |
Ramy Medhat | a9cc25d | 2020-01-27 14:21:24 -0500 | [diff] [blame^] | 29 | CC_WRAPPER := $(strip $(CC_WRAPPER) $(RBE_WRAPPER) $(RBE_CXX)) |
| 30 | CXX_WRAPPER := $(strip $(CXX_WRAPPER) $(RBE_WRAPPER) $(RBE_CXX)) |
| 31 | |
| 32 | ifdef RBE_JAVAC |
| 33 | JAVAC_WRAPPER := $(strip $(JAVAC_WRAPPER) $(RBE_WRAPPER) --labels=type=compile,lang=java,compiler=javac,shallow=true) |
| 34 | endif |
| 35 | |
| 36 | ifdef RBE_R8 |
| 37 | R8_WRAPPER := $(strip $(RBE_WRAPPER) --labels=type=compile,compiler=r8,shallow=true) |
| 38 | endif |
| 39 | |
| 40 | ifdef RBE_D8 |
| 41 | D8_WRAPPER := $(strip $(RBE_WRAPPER) --labels=type=compile,compiler=d8,shallow=true) |
| 42 | endif |
Ramy Medhat | ec8b8df | 2019-07-17 12:28:40 +0000 | [diff] [blame] | 43 | |
| 44 | rbe_dir := |
| 45 | endif |