diff --git a/cc/compiler.go b/cc/compiler.go
index a0068ad..32d98e4 100644
--- a/cc/compiler.go
+++ b/cc/compiler.go
@@ -100,6 +100,7 @@
 
 type baseCompiler struct {
 	Properties BaseCompilerProperties
+	deps       android.Paths
 }
 
 var _ compiler = (*baseCompiler)(nil)
@@ -337,10 +338,21 @@
 func (compiler *baseCompiler) compile(ctx ModuleContext, flags Flags, deps PathDeps) android.Paths {
 	pathDeps := deps.GeneratedHeaders
 	pathDeps = append(pathDeps, ndkPathDeps(ctx)...)
+
+	srcs := ctx.ExpandSources(compiler.Properties.Srcs, compiler.Properties.Exclude_srcs)
+	srcs = append(srcs, deps.GeneratedSources...)
+
+	buildFlags := flagsToBuilderFlags(flags)
+
+	srcs, genDeps := genSources(ctx, srcs, buildFlags)
+
+	pathDeps = append(pathDeps, genDeps...)
+	pathDeps = append(pathDeps, flags.CFlagsDeps...)
+
+	compiler.deps = pathDeps
+
 	// Compile files listed in c.Properties.Srcs into objects
-	objFiles := compileObjs(ctx, flags, "",
-		compiler.Properties.Srcs, compiler.Properties.Exclude_srcs,
-		deps.GeneratedSources, pathDeps)
+	objFiles := compileObjs(ctx, buildFlags, "", srcs, compiler.deps)
 
 	if ctx.Failed() {
 		return nil
@@ -350,17 +362,8 @@
 }
 
 // Compile a list of source files into objects a specified subdirectory
-func compileObjs(ctx android.ModuleContext, flags Flags,
-	subdir string, srcFiles, excludes []string, extraSrcs, deps android.Paths) android.Paths {
+func compileObjs(ctx android.ModuleContext, flags builderFlags,
+	subdir string, srcFiles, deps android.Paths) android.Paths {
 
-	buildFlags := flagsToBuilderFlags(flags)
-
-	inputFiles := ctx.ExpandSources(srcFiles, excludes)
-	inputFiles = append(inputFiles, extraSrcs...)
-	srcPaths, gendeps := genSources(ctx, inputFiles, buildFlags)
-
-	deps = append(deps, gendeps...)
-	deps = append(deps, flags.CFlagsDeps...)
-
-	return TransformSourceToObj(ctx, subdir, srcPaths, buildFlags, deps)
+	return TransformSourceToObj(ctx, subdir, srcFiles, flags, deps)
 }
diff --git a/cc/library.go b/cc/library.go
index a61e6a1..d3d142e 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -25,9 +25,8 @@
 
 type LibraryProperties struct {
 	Static struct {
-		Srcs         []string `android:"arch_variant"`
-		Exclude_srcs []string `android:"arch_variant"`
-		Cflags       []string `android:"arch_variant"`
+		Srcs   []string `android:"arch_variant"`
+		Cflags []string `android:"arch_variant"`
 
 		Enabled           *bool    `android:"arch_variant"`
 		Whole_static_libs []string `android:"arch_variant"`
@@ -35,9 +34,8 @@
 		Shared_libs       []string `android:"arch_variant"`
 	} `android:"arch_variant"`
 	Shared struct {
-		Srcs         []string `android:"arch_variant"`
-		Exclude_srcs []string `android:"arch_variant"`
-		Cflags       []string `android:"arch_variant"`
+		Srcs   []string `android:"arch_variant"`
+		Cflags []string `android:"arch_variant"`
 
 		Enabled           *bool    `android:"arch_variant"`
 		Whole_static_libs []string `android:"arch_variant"`
@@ -253,18 +251,16 @@
 
 	objFiles = library.baseCompiler.compile(ctx, flags, deps)
 	library.reuseObjFiles = objFiles
-
-	pathDeps := deps.GeneratedHeaders
-	pathDeps = append(pathDeps, ndkPathDeps(ctx)...)
+	buildFlags := flagsToBuilderFlags(flags)
 
 	if library.static() {
-		objFiles = append(objFiles, compileObjs(ctx, flags, android.DeviceStaticLibrary,
-			library.Properties.Static.Srcs, library.Properties.Static.Exclude_srcs,
-			nil, pathDeps)...)
+		srcs := android.PathsForModuleSrc(ctx, library.Properties.Static.Srcs)
+		objFiles = append(objFiles, compileObjs(ctx, buildFlags, android.DeviceStaticLibrary,
+			srcs, library.baseCompiler.deps)...)
 	} else {
-		objFiles = append(objFiles, compileObjs(ctx, flags, android.DeviceSharedLibrary,
-			library.Properties.Shared.Srcs, library.Properties.Shared.Exclude_srcs,
-			nil, pathDeps)...)
+		srcs := android.PathsForModuleSrc(ctx, library.Properties.Shared.Srcs)
+		objFiles = append(objFiles, compileObjs(ctx, buildFlags, android.DeviceSharedLibrary,
+			srcs, library.baseCompiler.deps)...)
 	}
 
 	return objFiles
diff --git a/cc/ndk_library.go b/cc/ndk_library.go
index 37ce268..6b0c325 100644
--- a/cc/ndk_library.go
+++ b/cc/ndk_library.go
@@ -227,12 +227,8 @@
 	)
 
 	subdir := ""
-	srcs := []string{}
-	excludeSrcs := []string{}
-	extraSrcs := []android.Path{stubSrcPath}
-	extraDeps := []android.Path{}
-	return compileObjs(ctx, flags, subdir, srcs, excludeSrcs,
-		extraSrcs, extraDeps)
+	srcs := []android.Path{stubSrcPath}
+	return compileObjs(ctx, flagsToBuilderFlags(flags), subdir, srcs, nil)
 }
 
 func (linker *stubDecorator) linkerDeps(ctx BaseModuleContext, deps Deps) Deps {
