aboutsummaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2018-02-07 02:27:08 +0000
committerandroid-build-merger <android-build-merger@google.com>2018-02-07 02:27:08 +0000
commit64ab8062ec96e62c8d36293af8ade726401a8122 (patch)
treee0b69411c6ebbc4e307b65c2f1c2557c21e0c4d4 /cc
parent6ba52d4d5607ef9671135c95920fb0b8601fcf29 (diff)
parentbfbda64f6ad21f1388d06b1205d52600fba69f55 (diff)
downloadbuild_soong-64ab8062ec96e62c8d36293af8ade726401a8122.tar.gz
build_soong-64ab8062ec96e62c8d36293af8ade726401a8122.tar.bz2
build_soong-64ab8062ec96e62c8d36293af8ade726401a8122.zip
Merge "Support filegroups for version_script and related properties" am: ca59511e21 am: 4009b12ead
am: bfbda64f6a Change-Id: Iace6d60c3d05af33825a5066caacf169bf7b541c
Diffstat (limited to 'cc')
-rw-r--r--cc/binary.go5
-rw-r--r--cc/library.go17
2 files changed, 16 insertions, 6 deletions
diff --git a/cc/binary.go b/cc/binary.go
index 206237af..630a68df 100644
--- a/cc/binary.go
+++ b/cc/binary.go
@@ -158,6 +158,9 @@ func (binary *binaryDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps {
ctx.ModuleErrorf("statically linking libc to dynamic executable, please remove libc\n" +
"from static libs or set static_executable: true")
}
+
+ android.ExtractSourceDeps(ctx, binary.Properties.Version_script)
+
return deps
}
@@ -277,7 +280,7 @@ func (binary *binaryDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags
func (binary *binaryDecorator) link(ctx ModuleContext,
flags Flags, deps PathDeps, objs Objects) android.Path {
- versionScript := android.OptionalPathForModuleSrc(ctx, binary.Properties.Version_script)
+ versionScript := ctx.ExpandOptionalSource(binary.Properties.Version_script, "version_script")
fileName := binary.getStem(ctx) + flags.Toolchain.ExecutableSuffix()
outputFile := android.PathForModuleOut(ctx, fileName)
ret := outputFile
diff --git a/cc/library.go b/cc/library.go
index 54c54760..f8e20e24 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -476,6 +476,13 @@ func (library *libraryDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps {
deps.SharedLibs = removeListFromList(deps.SharedLibs, library.baseLinker.Properties.Target.Vendor.Exclude_shared_libs)
deps.StaticLibs = removeListFromList(deps.StaticLibs, library.baseLinker.Properties.Target.Vendor.Exclude_static_libs)
}
+
+ android.ExtractSourceDeps(ctx, library.Properties.Version_script)
+ android.ExtractSourceDeps(ctx, library.Properties.Unexported_symbols_list)
+ android.ExtractSourceDeps(ctx, library.Properties.Force_symbols_not_weak_list)
+ android.ExtractSourceDeps(ctx, library.Properties.Force_symbols_weak_list)
+ android.ExtractSourceDeps(ctx, library.Properties.Target.Vendor.Version_script)
+
return deps
}
@@ -507,12 +514,12 @@ func (library *libraryDecorator) linkShared(ctx ModuleContext,
var linkerDeps android.Paths
linkerDeps = append(linkerDeps, flags.LdFlagsDeps...)
- versionScript := android.OptionalPathForModuleSrc(ctx, library.Properties.Version_script)
- unexportedSymbols := android.OptionalPathForModuleSrc(ctx, library.Properties.Unexported_symbols_list)
- forceNotWeakSymbols := android.OptionalPathForModuleSrc(ctx, library.Properties.Force_symbols_not_weak_list)
- forceWeakSymbols := android.OptionalPathForModuleSrc(ctx, library.Properties.Force_symbols_weak_list)
+ versionScript := ctx.ExpandOptionalSource(library.Properties.Version_script, "version_script")
+ unexportedSymbols := ctx.ExpandOptionalSource(library.Properties.Unexported_symbols_list, "unexported_symbols_list")
+ forceNotWeakSymbols := ctx.ExpandOptionalSource(library.Properties.Force_symbols_not_weak_list, "force_symbols_not_weak_list")
+ forceWeakSymbols := ctx.ExpandOptionalSource(library.Properties.Force_symbols_weak_list, "force_symbols_weak_list")
if ctx.useVndk() && library.Properties.Target.Vendor.Version_script != nil {
- versionScript = android.OptionalPathForModuleSrc(ctx, library.Properties.Target.Vendor.Version_script)
+ versionScript = ctx.ExpandOptionalSource(library.Properties.Target.Vendor.Version_script, "target.vendor.version_script")
}
if !ctx.Darwin() {
if versionScript.Valid() {