summaryrefslogtreecommitdiff
path: root/cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc')
-rw-r--r--cc/builder.go12
-rw-r--r--cc/cc.go4
-rw-r--r--cc/stl.go7
3 files changed, 7 insertions, 16 deletions
diff --git a/cc/builder.go b/cc/builder.go
index 4771b8932..8c9743ff4 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -182,11 +182,11 @@ var (
blueprint.RuleParams{
Depfile: "${out}.d",
Deps: blueprint.DepsGCC,
- Command: "CROSS_COMPILE=$crossCompile $tocPath $format -i ${in} -o ${out} -d ${out}.d",
+ Command: "CLANG_BIN=$clangBin $tocPath $format -i ${in} -o ${out} -d ${out}.d",
CommandDeps: []string{"$tocPath"},
Restat: true,
},
- "crossCompile", "format")
+ "clangBin", "format")
// Rule for invoking clang-tidy (a clang-based linter).
clangTidy, clangTidyRE = pctx.RemoteStaticRules("clangTidy",
@@ -918,16 +918,12 @@ func transformSharedObjectToToc(ctx android.ModuleContext, inputFile android.Pat
outputFile android.WritablePath, flags builderFlags) {
var format string
- var crossCompile string
if ctx.Darwin() {
format = "--macho"
- crossCompile = "${config.MacToolPath}"
} else if ctx.Windows() {
format = "--pe"
- crossCompile = gccCmd(flags.toolchain, "")
} else {
format = "--elf"
- crossCompile = gccCmd(flags.toolchain, "")
}
ctx.Build(pctx, android.BuildParams{
@@ -936,8 +932,8 @@ func transformSharedObjectToToc(ctx android.ModuleContext, inputFile android.Pat
Output: outputFile,
Input: inputFile,
Args: map[string]string{
- "crossCompile": crossCompile,
- "format": format,
+ "clangBin": "${config.ClangBin}",
+ "format": format,
},
})
}
diff --git a/cc/cc.go b/cc/cc.go
index f074597bd..bef89fa8e 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1892,8 +1892,8 @@ func (c *Module) deps(ctx DepsContext) Deps {
}
for _, lib := range deps.ReexportStaticLibHeaders {
- if !inList(lib, deps.StaticLibs) {
- ctx.PropertyErrorf("export_static_lib_headers", "Static library not in static_libs: '%s'", lib)
+ if !inList(lib, deps.StaticLibs) && !inList(lib, deps.WholeStaticLibs) {
+ ctx.PropertyErrorf("export_static_lib_headers", "Static library not in static_libs or whole_static_libs: '%s'", lib)
}
}
diff --git a/cc/stl.go b/cc/stl.go
index 75fab1702..594231d78 100644
--- a/cc/stl.go
+++ b/cc/stl.go
@@ -188,12 +188,7 @@ func (stl *stl) deps(ctx BaseModuleContext, deps Deps) Deps {
if needsLibAndroidSupport(ctx) {
deps.StaticLibs = append(deps.StaticLibs, "ndk_libandroid_support")
}
- // TODO: Switch the NDK over to the LLVM unwinder for non-arm32 architectures.
- if ctx.Arch().ArchType == android.Arm {
- deps.StaticLibs = append(deps.StaticLibs, "ndk_libunwind")
- } else {
- deps.StaticLibs = append(deps.StaticLibs, "libgcc_stripped")
- }
+ deps.StaticLibs = append(deps.StaticLibs, "ndk_libunwind")
default:
panic(fmt.Errorf("Unknown stl: %q", stl.Properties.SelectedStl))
}