Merge "Add installable property for prebuilt_apex"
diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go
index 8b996e0..e0932af 100644
--- a/androidmk/cmd/androidmk/android.go
+++ b/androidmk/cmd/androidmk/android.go
@@ -146,6 +146,7 @@
"LOCAL_RENDERSCRIPT_FLAGS": "renderscript.flags",
"LOCAL_JAVA_RESOURCE_DIRS": "java_resource_dirs",
+ "LOCAL_JAVA_RESOURCE_FILES": "java_resources",
"LOCAL_JAVACFLAGS": "javacflags",
"LOCAL_ERROR_PRONE_FLAGS": "errorprone.javacflags",
"LOCAL_DX_FLAGS": "dxflags",
diff --git a/androidmk/cmd/androidmk/androidmk_test.go b/androidmk/cmd/androidmk/androidmk_test.go
index f2dc6ff..34e673c 100644
--- a/androidmk/cmd/androidmk/androidmk_test.go
+++ b/androidmk/cmd/androidmk/androidmk_test.go
@@ -577,6 +577,10 @@
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-java-files-under, src gen)
include $(BUILD_STATIC_JAVA_LIBRARY)
+
+ include $(CLEAR_VARS)
+ LOCAL_JAVA_RESOURCE_FILES := foo bar
+ include $(BUILD_STATIC_JAVA_LIBRARY)
`,
expected: `
java_library {
@@ -604,6 +608,13 @@
"gen/**/*.java",
],
}
+
+ java_library {
+ java_resources: [
+ "foo",
+ "bar",
+ ],
+ }
`,
},
{
diff --git a/cc/builder.go b/cc/builder.go
index c64243f..e643584 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -150,8 +150,8 @@
clangTidy = pctx.AndroidStaticRule("clangTidy",
blueprint.RuleParams{
- Command: "rm -f $out && CLANG_TIDY=${config.ClangBin}/clang-tidy ${config.ClangTidyShellPath} $tidyFlags $in -- $cFlags && touch $out",
- CommandDeps: []string{"${config.ClangBin}/clang-tidy", "${config.ClangTidyShellPath}"},
+ Command: "rm -f $out && ${config.ClangBin}/clang-tidy $tidyFlags $in -- $cFlags && touch $out",
+ CommandDeps: []string{"${config.ClangBin}/clang-tidy"},
},
"cFlags", "tidyFlags")
diff --git a/cc/config/global.go b/cc/config/global.go
index 372ffc4..78f24f2 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -200,7 +200,6 @@
})
pctx.StaticVariable("ClangPath", "${ClangBase}/${HostPrebuiltTag}/${ClangVersion}")
pctx.StaticVariable("ClangBin", "${ClangPath}/bin")
- pctx.StaticVariable("ClangTidyShellPath", "build/soong/scripts/clang-tidy.sh")
pctx.VariableFunc("ClangShortVersion", func(ctx android.PackageVarContext) string {
if override := ctx.Config().Getenv("LLVM_RELEASE_VERSION"); override != "" {
diff --git a/cc/makevars.go b/cc/makevars.go
index aa6fdea..dc91525 100644
--- a/cc/makevars.go
+++ b/cc/makevars.go
@@ -75,7 +75,6 @@
ctx.Strict("LLVM_OBJCOPY", "${config.ClangBin}/llvm-objcopy")
ctx.Strict("LLVM_STRIP", "${config.ClangBin}/llvm-strip")
ctx.Strict("PATH_TO_CLANG_TIDY", "${config.ClangBin}/clang-tidy")
- ctx.Strict("PATH_TO_CLANG_TIDY_SHELL", "${config.ClangTidyShellPath}")
ctx.StrictSorted("CLANG_CONFIG_UNKNOWN_CFLAGS", strings.Join(config.ClangUnknownCflags, " "))
ctx.Strict("RS_LLVM_PREBUILTS_VERSION", "${config.RSClangVersion}")
diff --git a/scripts/clang-tidy.sh b/scripts/clang-tidy.sh
deleted file mode 100755
index 04d0bdd..0000000
--- a/scripts/clang-tidy.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash -e
-
-# Copyright 2018 Google Inc. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Wrapper script to remove clang compiler flags rejected by clang-tidy.
-# Inputs:
-# Environment:
-# CLANG_TIDY: path to the real clang-tidy program
-
-# clang-tidy doesn't recognize every flag that clang compiler does.
-# It gives clang-diagnostic-unused-command-line-argument warnings
-# to -Wa,* flags.
-# The -flto flags caused clang-tidy to ignore the -I flags,
-# see https://bugs.llvm.org/show_bug.cgi?id=38332.
-# -fsanitize and -fwhole-program-vtables need -flto.
-args=("${@}")
-n=${#args[@]}
-for ((i=0; i<$n; ++i)); do
- case ${args[i]} in
- -Wa,*|-flto|-flto=*|-fsanitize=*|-fsanitize-*|-fwhole-program-vtables)
- unset args[i]
- ;;
- esac
-done
-${CLANG_TIDY} "${args[@]}"