diff options
author | Colin Cross <ccross@android.com> | 2017-08-09 02:50:54 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-08-09 02:50:54 +0000 |
commit | 8d6aed7ed7a6ff97028ebd7344476e1fcce98c30 (patch) | |
tree | a7378067cebd0b456f2438662f74b3bdaee34300 | |
parent | 998d9eb6b97eb3a8fed4782a9f81e1e986e8b4b3 (diff) | |
parent | 94921e78df92e3115d4897e5ce8fa4e0d63f4c3b (diff) | |
download | build_soong-8d6aed7ed7a6ff97028ebd7344476e1fcce98c30.tar.gz build_soong-8d6aed7ed7a6ff97028ebd7344476e1fcce98c30.tar.bz2 build_soong-8d6aed7ed7a6ff97028ebd7344476e1fcce98c30.zip |
Merge "Copy prebuilt binaries"
-rw-r--r-- | cc/prebuilt.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cc/prebuilt.go b/cc/prebuilt.go index ac05df01..976c711d 100644 --- a/cc/prebuilt.go +++ b/cc/prebuilt.go @@ -116,7 +116,19 @@ func (p *prebuiltBinaryLinker) link(ctx ModuleContext, // TODO(ccross): verify shared library dependencies if len(p.Prebuilt.Properties.Srcs) > 0 { // TODO(ccross): .toc optimization, stripping, packing - return p.Prebuilt.Path(ctx) + + // Copy binaries to a name matching the final installed name + fileName := p.getStem(ctx) + flags.Toolchain.ExecutableSuffix() + outputFile := android.PathForModuleOut(ctx, fileName) + + ctx.ModuleBuild(pctx, android.ModuleBuildParams{ + Rule: android.Cp, + Description: "prebuilt", + Output: outputFile, + Input: p.Prebuilt.Path(ctx), + }) + + return outputFile } return nil |