Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53c21b71 authored by Dimitry Ivanov's avatar Dimitry Ivanov Committed by Gerrit Code Review
Browse files

Merge "Make filegroups work for library.Shared/Static.Srcs"

parents 89dbee61 0345ad80
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -415,11 +415,11 @@ func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps Pa
	buildFlags := flagsToBuilderFlags(flags)

	if library.static() {
		srcs := android.PathsForModuleSrc(ctx, library.Properties.Static.Srcs)
		srcs := ctx.ExpandSources(library.Properties.Static.Srcs, nil)
		objs = objs.Append(compileObjs(ctx, buildFlags, android.DeviceStaticLibrary,
			srcs, library.baseCompiler.pathDeps, library.baseCompiler.cFlagsDeps))
	} else if library.shared() {
		srcs := android.PathsForModuleSrc(ctx, library.Properties.Shared.Srcs)
		srcs := ctx.ExpandSources(library.Properties.Shared.Srcs, nil)
		objs = objs.Append(compileObjs(ctx, buildFlags, android.DeviceSharedLibrary,
			srcs, library.baseCompiler.pathDeps, library.baseCompiler.cFlagsDeps))
	}
@@ -491,6 +491,18 @@ func (library *libraryDecorator) linkerInit(ctx BaseModuleContext) {
	}
}

func (library *libraryDecorator) compilerDeps(ctx DepsContext, deps Deps) Deps {
	deps = library.baseCompiler.compilerDeps(ctx, deps)

	if library.static() {
		android.ExtractSourcesDeps(ctx, library.Properties.Static.Srcs)
	} else if library.shared() {
		android.ExtractSourcesDeps(ctx, library.Properties.Shared.Srcs)
	}

	return deps
}

func (library *libraryDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps {
	if library.static() {
		if library.Properties.Static.System_shared_libs != nil {