summaryrefslogtreecommitdiff
path: root/cc/compiler.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2019-03-04 22:35:41 -0800
committer Colin Cross <ccross@android.com> 2019-03-07 18:36:35 +0000
commit27b922f53e938896c0a693a1d9f50e6c9e686ad7 (patch)
treed3383cbdebb9fb78d8d96fa3a3023764620d483e /cc/compiler.go
parent1b48842a4b83ba6234d26ff4c77a0884f5008f62 (diff)
Annotate paths and deprecate ExtractSource(s)Deps
Add `android:"path"` to all properties that take paths to source files, and remove the calls to ExtractSource(s)Deps, the pathsDepsMutator will add the necessary SourceDepTag dependency. Test: All soong tests Change-Id: I488ba1a5d680aaa50b04fc38acf693e23c6d4d6d
Diffstat (limited to 'cc/compiler.go')
-rw-r--r--cc/compiler.go15
1 files changed, 6 insertions, 9 deletions
diff --git a/cc/compiler.go b/cc/compiler.go
index 53a60c7fa..df396e815 100644
--- a/cc/compiler.go
+++ b/cc/compiler.go
@@ -31,11 +31,11 @@ type BaseCompilerProperties struct {
// list of source files used to compile the C/C++ module. May be .c, .cpp, or .S files.
// srcs may reference the outputs of other modules that produce source files like genrule
// or filegroup using the syntax ":module".
- Srcs []string `android:"arch_variant"`
+ Srcs []string `android:"path,arch_variant"`
// list of source files that should not be used to build the C/C++ module.
// This is most useful in the arch/multilib variants to remove non-common files
- Exclude_srcs []string `android:"arch_variant"`
+ Exclude_srcs []string `android:"path,arch_variant"`
// list of module-specific flags that will be used for C and C++ compiles.
Cflags []string `android:"arch_variant"`
@@ -136,11 +136,11 @@ type BaseCompilerProperties struct {
Vendor struct {
// list of source files that should only be used in the
// vendor variant of the C/C++ module.
- Srcs []string
+ Srcs []string `android:"path"`
// list of source files that should not be used to
// build the vendor variant of the C/C++ module.
- Exclude_srcs []string
+ Exclude_srcs []string `android:"path"`
// List of additional cflags that should be used to build the vendor
// variant of the C/C++ module.
@@ -149,11 +149,11 @@ type BaseCompilerProperties struct {
Recovery struct {
// list of source files that should only be used in the
// recovery variant of the C/C++ module.
- Srcs []string
+ Srcs []string `android:"path"`
// list of source files that should not be used to
// build the recovery variant of the C/C++ module.
- Exclude_srcs []string
+ Exclude_srcs []string `android:"path"`
// List of additional cflags that should be used to build the recovery
// variant of the C/C++ module.
@@ -221,9 +221,6 @@ func (compiler *baseCompiler) compilerDeps(ctx DepsContext, deps Deps) Deps {
deps.GeneratedSources = append(deps.GeneratedSources, compiler.Properties.Generated_sources...)
deps.GeneratedHeaders = append(deps.GeneratedHeaders, compiler.Properties.Generated_headers...)
- android.ExtractSourcesDeps(ctx, compiler.Properties.Srcs)
- android.ExtractSourcesDeps(ctx, compiler.Properties.Exclude_srcs)
-
if compiler.hasSrcExt(".proto") {
deps = protoDeps(ctx, deps, &compiler.Proto, Bool(compiler.Properties.Proto.Static))
}