Loading cc/binary.go +1 −0 Original line number Diff line number Diff line Loading @@ -412,6 +412,7 @@ func (binary *binaryDecorator) link(ctx ModuleContext, linkerDeps = append(linkerDeps, deps.EarlySharedLibsDeps...) linkerDeps = append(linkerDeps, deps.SharedLibsDeps...) linkerDeps = append(linkerDeps, deps.LateSharedLibsDeps...) linkerDeps = append(linkerDeps, ndkSharedLibDeps(ctx)...) } validations = append(validations, objs.tidyFiles...) Loading cc/builder.go +1 −5 Original line number Diff line number Diff line Loading @@ -549,10 +549,6 @@ func transformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles, no return "$" + kind + n } // clang-tidy checks source files and does not need to link with libraries. // tidyPathDeps should contain pathDeps but not libraries. tidyPathDeps := skipNdkLibraryDeps(ctx, pathDeps) for i, srcFile := range srcFiles { objFile := android.ObjPathWithExt(ctx, subdir, srcFile, "o") Loading Loading @@ -676,7 +672,7 @@ func transformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles, no Output: tidyFile, Input: srcFile, Implicits: cFlagsDeps, OrderOnly: tidyPathDeps, OrderOnly: pathDeps, Args: map[string]string{ "ccCmd": ccCmd, "cFlags": shareFlags("cFlags", escapeSingleQuotes(moduleToolingFlags)), Loading cc/compiler.go +3 −3 Original line number Diff line number Diff line Loading @@ -637,9 +637,9 @@ var gnuToCReplacer = strings.NewReplacer("gnu", "c") func ndkPathDeps(ctx ModuleContext) android.Paths { if ctx.Module().(*Module).IsSdkVariant() { // The NDK sysroot timestamp file depends on all the NDK sysroot files // (headers and libraries). return android.Paths{getNdkBaseTimestampFile(ctx)} // The NDK sysroot timestamp file depends on all the NDK sysroot header files // for compiling src to obj files. return android.Paths{getNdkHeadersTimestampFile(ctx)} } return nil } Loading cc/library.go +10 −0 Original line number Diff line number Diff line Loading @@ -1366,11 +1366,21 @@ func (library *libraryDecorator) linkStatic(ctx ModuleContext, return outputFile } func ndkSharedLibDeps(ctx ModuleContext) android.Paths { if ctx.Module().(*Module).IsSdkVariant() { // The NDK sysroot timestamp file depends on all the NDK // sysroot header and shared library files. return android.Paths{getNdkBaseTimestampFile(ctx)} } return nil } func (library *libraryDecorator) linkShared(ctx ModuleContext, flags Flags, deps PathDeps, objs Objects) android.Path { var linkerDeps android.Paths linkerDeps = append(linkerDeps, flags.LdFlagsDeps...) linkerDeps = append(linkerDeps, ndkSharedLibDeps(ctx)...) unexportedSymbols := ctx.ExpandOptionalSource(library.Properties.Unexported_symbols_list, "unexported_symbols_list") forceNotWeakSymbols := ctx.ExpandOptionalSource(library.Properties.Force_symbols_not_weak_list, "force_symbols_not_weak_list") Loading cc/ndk_sysroot.go +0 −15 Original line number Diff line number Diff line Loading @@ -94,21 +94,6 @@ func getNdkFullTimestampFile(ctx android.PathContext) android.WritablePath { return android.PathForOutput(ctx, "ndk.timestamp") } // Replace ndk_base.timestamp and ndk.timestamp with ndk_headers.timestamp. func skipNdkLibraryDeps(ctx android.ModuleContext, paths android.Paths) android.Paths { var newPaths android.Paths baseTimestamp := getNdkBaseTimestampFile(ctx) fullTimestamp := getNdkFullTimestampFile(ctx) headersTimestamp := getNdkHeadersTimestampFile(ctx) for _, path := range paths { if path == baseTimestamp || path == fullTimestamp { path = headersTimestamp } newPaths = append(newPaths, path) } return newPaths } func NdkSingleton() android.Singleton { return &ndkSingleton{} } Loading Loading
cc/binary.go +1 −0 Original line number Diff line number Diff line Loading @@ -412,6 +412,7 @@ func (binary *binaryDecorator) link(ctx ModuleContext, linkerDeps = append(linkerDeps, deps.EarlySharedLibsDeps...) linkerDeps = append(linkerDeps, deps.SharedLibsDeps...) linkerDeps = append(linkerDeps, deps.LateSharedLibsDeps...) linkerDeps = append(linkerDeps, ndkSharedLibDeps(ctx)...) } validations = append(validations, objs.tidyFiles...) Loading
cc/builder.go +1 −5 Original line number Diff line number Diff line Loading @@ -549,10 +549,6 @@ func transformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles, no return "$" + kind + n } // clang-tidy checks source files and does not need to link with libraries. // tidyPathDeps should contain pathDeps but not libraries. tidyPathDeps := skipNdkLibraryDeps(ctx, pathDeps) for i, srcFile := range srcFiles { objFile := android.ObjPathWithExt(ctx, subdir, srcFile, "o") Loading Loading @@ -676,7 +672,7 @@ func transformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles, no Output: tidyFile, Input: srcFile, Implicits: cFlagsDeps, OrderOnly: tidyPathDeps, OrderOnly: pathDeps, Args: map[string]string{ "ccCmd": ccCmd, "cFlags": shareFlags("cFlags", escapeSingleQuotes(moduleToolingFlags)), Loading
cc/compiler.go +3 −3 Original line number Diff line number Diff line Loading @@ -637,9 +637,9 @@ var gnuToCReplacer = strings.NewReplacer("gnu", "c") func ndkPathDeps(ctx ModuleContext) android.Paths { if ctx.Module().(*Module).IsSdkVariant() { // The NDK sysroot timestamp file depends on all the NDK sysroot files // (headers and libraries). return android.Paths{getNdkBaseTimestampFile(ctx)} // The NDK sysroot timestamp file depends on all the NDK sysroot header files // for compiling src to obj files. return android.Paths{getNdkHeadersTimestampFile(ctx)} } return nil } Loading
cc/library.go +10 −0 Original line number Diff line number Diff line Loading @@ -1366,11 +1366,21 @@ func (library *libraryDecorator) linkStatic(ctx ModuleContext, return outputFile } func ndkSharedLibDeps(ctx ModuleContext) android.Paths { if ctx.Module().(*Module).IsSdkVariant() { // The NDK sysroot timestamp file depends on all the NDK // sysroot header and shared library files. return android.Paths{getNdkBaseTimestampFile(ctx)} } return nil } func (library *libraryDecorator) linkShared(ctx ModuleContext, flags Flags, deps PathDeps, objs Objects) android.Path { var linkerDeps android.Paths linkerDeps = append(linkerDeps, flags.LdFlagsDeps...) linkerDeps = append(linkerDeps, ndkSharedLibDeps(ctx)...) unexportedSymbols := ctx.ExpandOptionalSource(library.Properties.Unexported_symbols_list, "unexported_symbols_list") forceNotWeakSymbols := ctx.ExpandOptionalSource(library.Properties.Force_symbols_not_weak_list, "force_symbols_not_weak_list") Loading
cc/ndk_sysroot.go +0 −15 Original line number Diff line number Diff line Loading @@ -94,21 +94,6 @@ func getNdkFullTimestampFile(ctx android.PathContext) android.WritablePath { return android.PathForOutput(ctx, "ndk.timestamp") } // Replace ndk_base.timestamp and ndk.timestamp with ndk_headers.timestamp. func skipNdkLibraryDeps(ctx android.ModuleContext, paths android.Paths) android.Paths { var newPaths android.Paths baseTimestamp := getNdkBaseTimestampFile(ctx) fullTimestamp := getNdkFullTimestampFile(ctx) headersTimestamp := getNdkHeadersTimestampFile(ctx) for _, path := range paths { if path == baseTimestamp || path == fullTimestamp { path = headersTimestamp } newPaths = append(newPaths, path) } return newPaths } func NdkSingleton() android.Singleton { return &ndkSingleton{} } Loading