summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cc/compdb.go2
-rw-r--r--cc/kernel_headers.go2
-rw-r--r--cc/llndk_library.go6
-rw-r--r--cc/ndk_prebuilt.go2
-rw-r--r--cc/test.go5
5 files changed, 11 insertions, 6 deletions
diff --git a/cc/compdb.go b/cc/compdb.go
index a9c5b5e9f..acfc924fd 100644
--- a/cc/compdb.go
+++ b/cc/compdb.go
@@ -181,7 +181,7 @@ func generateCompdbProject(compiledModule CompiledInterface, ctx android.Singlet
func evalAndSplitVariable(ctx android.SingletonContext, str string) ([]string, error) {
evaluated, err := ctx.Eval(pctx, str)
if err == nil {
- return strings.Split(evaluated, " "), nil
+ return strings.Fields(evaluated), nil
}
return []string{""}, err
}
diff --git a/cc/kernel_headers.go b/cc/kernel_headers.go
index 42dc7701c..82a779c33 100644
--- a/cc/kernel_headers.go
+++ b/cc/kernel_headers.go
@@ -26,7 +26,7 @@ func (stub *kernelHeadersDecorator) link(ctx ModuleContext, flags Flags, deps Pa
if ctx.Device() {
f := &stub.libraryDecorator.flagExporter
for _, dir := range ctx.DeviceConfig().DeviceKernelHeaderDirs() {
- f.flags = append(f.flags, "-isystem"+dir)
+ f.flags = append(f.flags, "-isystem "+dir)
}
}
return stub.libraryDecorator.linkStatic(ctx, flags, deps, objs)
diff --git a/cc/llndk_library.go b/cc/llndk_library.go
index c23dfd413..32da05946 100644
--- a/cc/llndk_library.go
+++ b/cc/llndk_library.go
@@ -144,17 +144,17 @@ func (stub *llndkStubDecorator) link(ctx ModuleContext, flags Flags, deps PathDe
timestampFiles = append(timestampFiles, stub.processHeaders(ctx, dir, genHeaderOutDir))
}
- includePrefix := "-I "
+ includePrefix := "-I"
if Bool(stub.Properties.Export_headers_as_system) {
includePrefix = "-isystem "
}
- stub.reexportFlags([]string{includePrefix + " " + genHeaderOutDir.String()})
+ stub.reexportFlags([]string{includePrefix + genHeaderOutDir.String()})
stub.reexportDeps(timestampFiles)
}
if Bool(stub.Properties.Export_headers_as_system) {
- stub.exportIncludes(ctx, "-isystem")
+ stub.exportIncludes(ctx, "-isystem ")
stub.libraryDecorator.flagExporter.Properties.Export_include_dirs = []string{}
}
diff --git a/cc/ndk_prebuilt.go b/cc/ndk_prebuilt.go
index 258d6bd97..2a7e6573a 100644
--- a/cc/ndk_prebuilt.go
+++ b/cc/ndk_prebuilt.go
@@ -137,7 +137,7 @@ func (ndk *ndkPrebuiltStlLinker) link(ctx ModuleContext, flags Flags,
ctx.ModuleErrorf("NDK prebuilt libraries must have an ndk_lib prefixed name")
}
- ndk.exportIncludes(ctx, "-isystem")
+ ndk.exportIncludes(ctx, "-isystem ")
libName := strings.TrimPrefix(ctx.ModuleName(), "ndk_")
libExt := flags.Toolchain.ShlibSuffix()
diff --git a/cc/test.go b/cc/test.go
index 3fffffcd3..96049db8d 100644
--- a/cc/test.go
+++ b/cc/test.go
@@ -26,6 +26,9 @@ import (
type TestProperties struct {
// if set, build against the gtest library. Defaults to true.
Gtest *bool
+
+ // if set, use the isolated gtest runner. Defaults to false.
+ Isolated *bool
}
type TestBinaryProperties struct {
@@ -168,6 +171,8 @@ func (test *testDecorator) linkerDeps(ctx BaseModuleContext, deps Deps) Deps {
if test.gtest() {
if ctx.useSdk() && ctx.Device() {
deps.StaticLibs = append(deps.StaticLibs, "libgtest_main_ndk_c++", "libgtest_ndk_c++")
+ } else if BoolDefault(test.Properties.Isolated, false) {
+ deps.StaticLibs = append(deps.StaticLibs, "libgtest_isolated_main")
} else {
deps.StaticLibs = append(deps.StaticLibs, "libgtest_main", "libgtest")
}