blob: 2b51d8be4421db2aed7ce39ed7be4884096fce51 [file] [log] [blame]
Shinichiro Hamajiee482fd2015-08-17 17:38:24 +09001#
2# Copyright (C) 2015 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 Goma build infrastructure.
Shinichiro Hamajid78cba12015-12-18 15:26:17 +090018ifneq ($(filter-out false,$(USE_GOMA)),)
Shinichiro Hamajiee482fd2015-08-17 17:38:24 +090019 ifdef GOMA_DIR
20 goma_dir := $(GOMA_DIR)
21 else
22 goma_dir := $(HOME)/goma
23 endif
Shinichiro Hamaji09295a82015-09-24 17:51:20 +090024 GOMA_CC := $(goma_dir)/gomacc
Shinichiro Hamajiee482fd2015-08-17 17:38:24 +090025
Shinichiro Hamajiee482fd2015-08-17 17:38:24 +090026 # Append gomacc to existing *_WRAPPER variables so it's possible to
27 # use both ccache and gomacc.
Shinichiro Hamaji09295a82015-09-24 17:51:20 +090028 CC_WRAPPER := $(strip $(CC_WRAPPER) $(GOMA_CC))
29 CXX_WRAPPER := $(strip $(CXX_WRAPPER) $(GOMA_CC))
Colin Cross28ff3e32020-03-05 12:41:30 -080030 # b/143658984: goma can't handle the --system argument to javac
31 #JAVAC_WRAPPER := $(strip $(JAVAC_WRAPPER) $(GOMA_CC))
Shinichiro Hamajiee482fd2015-08-17 17:38:24 +090032
Shinichiro Hamajiee482fd2015-08-17 17:38:24 +090033 goma_dir :=
34endif