Loading android/bazel.go +7 −3 Original line number Diff line number Diff line Loading @@ -168,9 +168,10 @@ var ( "system/logging/liblog": Bp2BuildDefaultTrueRecursively, "system/timezone/apex": Bp2BuildDefaultTrueRecursively, "system/timezone/output_data": Bp2BuildDefaultTrueRecursively, "external/jemalloc_new": Bp2BuildDefaultTrueRecursively, "external/fmtlib": Bp2BuildDefaultTrueRecursively, "external/arm-optimized-routines": Bp2BuildDefaultTrueRecursively, "external/fmtlib": Bp2BuildDefaultTrueRecursively, "external/jemalloc_new": Bp2BuildDefaultTrueRecursively, "external/libcxxabi": Bp2BuildDefaultTrueRecursively, "external/scudo": Bp2BuildDefaultTrueRecursively, "prebuilts/clang/host/linux-x86": Bp2BuildDefaultTrueRecursively, } Loading Loading @@ -233,7 +234,10 @@ var ( // Per-module denylist to opt modules out of mixed builds. Such modules will // still be generated via bp2build. mixedBuildsDisabledList = []string{} mixedBuildsDisabledList = []string{ "libc++abi", // http://b/195970501, cc_library_static, duplicate symbols because it propagates libc objects. "libc++demangle", // http://b/195970501, cc_library_static, duplicate symbols because it propagates libc objects. } // Used for quicker lookups bp2buildModuleDoNotConvert = map[string]bool{} Loading cc/bp2build.go +6 −0 Original line number Diff line number Diff line Loading @@ -240,6 +240,8 @@ type compilerAttributes struct { // C++ options and sources cppFlags bazel.StringListAttribute srcs bazel.LabelListAttribute rtti bazel.BoolAttribute } // bp2BuildParseCompilerProps returns copts, srcs and hdrs and other attributes. Loading @@ -249,6 +251,7 @@ func bp2BuildParseCompilerProps(ctx android.TopDownMutatorContext, module *Modul var asFlags bazel.StringListAttribute var conlyFlags bazel.StringListAttribute var cppFlags bazel.StringListAttribute var rtti bazel.BoolAttribute // Creates the -I flags for a directory, while making the directory relative // to the exec root for Bazel to work. Loading Loading @@ -302,6 +305,7 @@ func bp2BuildParseCompilerProps(ctx android.TopDownMutatorContext, module *Modul asFlags.Value = parseCommandLineFlags(baseCompilerProps.Asflags) conlyFlags.Value = parseCommandLineFlags(baseCompilerProps.Conlyflags) cppFlags.Value = parseCommandLineFlags(baseCompilerProps.Cppflags) rtti.Value = baseCompilerProps.Rtti for _, dir := range parseLocalIncludeDirs(baseCompilerProps) { copts.Value = append(copts.Value, includeFlags(dir)...) Loading Loading @@ -345,6 +349,7 @@ func bp2BuildParseCompilerProps(ctx android.TopDownMutatorContext, module *Modul asFlags.SetSelectValue(axis, config, archVariantAsflags) conlyFlags.SetSelectValue(axis, config, parseCommandLineFlags(baseCompilerProps.Conlyflags)) cppFlags.SetSelectValue(axis, config, parseCommandLineFlags(baseCompilerProps.Cppflags)) rtti.SetSelectValue(axis, config, baseCompilerProps.Rtti) } } } Loading Loading @@ -380,6 +385,7 @@ func bp2BuildParseCompilerProps(ctx android.TopDownMutatorContext, module *Modul cSrcs: cSrcs, conlyFlags: conlyFlags, cppFlags: cppFlags, rtti: rtti, } } Loading cc/library.go +4 −0 Original line number Diff line number Diff line Loading @@ -236,6 +236,7 @@ type bazelCcLibraryAttributes struct { Includes bazel.StringListAttribute Linkopts bazel.StringListAttribute Use_libcrt bazel.BoolAttribute Rtti bazel.BoolAttribute // This is shared only. Version_script bazel.LabelAttribute Loading Loading @@ -323,6 +324,7 @@ func CcLibraryBp2Build(ctx android.TopDownMutatorContext) { Includes: exportedIncludes, Linkopts: linkerAttrs.linkopts, Use_libcrt: linkerAttrs.useLibcrt, Rtti: compilerAttrs.rtti, Version_script: linkerAttrs.versionScript, Loading Loading @@ -2335,6 +2337,7 @@ type bazelCcLibraryStaticAttributes struct { Linkopts bazel.StringListAttribute Linkstatic bool Use_libcrt bazel.BoolAttribute Rtti bazel.BoolAttribute Includes bazel.StringListAttribute Hdrs bazel.LabelListAttribute Loading Loading @@ -2396,6 +2399,7 @@ func ccLibraryStaticBp2BuildInternal(ctx android.TopDownMutatorContext, module * Linkopts: linkerAttrs.linkopts, Linkstatic: true, Use_libcrt: linkerAttrs.useLibcrt, Rtti: compilerAttrs.rtti, Includes: exportedIncludes, Cppflags: compilerAttrs.cppFlags, Loading Loading
android/bazel.go +7 −3 Original line number Diff line number Diff line Loading @@ -168,9 +168,10 @@ var ( "system/logging/liblog": Bp2BuildDefaultTrueRecursively, "system/timezone/apex": Bp2BuildDefaultTrueRecursively, "system/timezone/output_data": Bp2BuildDefaultTrueRecursively, "external/jemalloc_new": Bp2BuildDefaultTrueRecursively, "external/fmtlib": Bp2BuildDefaultTrueRecursively, "external/arm-optimized-routines": Bp2BuildDefaultTrueRecursively, "external/fmtlib": Bp2BuildDefaultTrueRecursively, "external/jemalloc_new": Bp2BuildDefaultTrueRecursively, "external/libcxxabi": Bp2BuildDefaultTrueRecursively, "external/scudo": Bp2BuildDefaultTrueRecursively, "prebuilts/clang/host/linux-x86": Bp2BuildDefaultTrueRecursively, } Loading Loading @@ -233,7 +234,10 @@ var ( // Per-module denylist to opt modules out of mixed builds. Such modules will // still be generated via bp2build. mixedBuildsDisabledList = []string{} mixedBuildsDisabledList = []string{ "libc++abi", // http://b/195970501, cc_library_static, duplicate symbols because it propagates libc objects. "libc++demangle", // http://b/195970501, cc_library_static, duplicate symbols because it propagates libc objects. } // Used for quicker lookups bp2buildModuleDoNotConvert = map[string]bool{} Loading
cc/bp2build.go +6 −0 Original line number Diff line number Diff line Loading @@ -240,6 +240,8 @@ type compilerAttributes struct { // C++ options and sources cppFlags bazel.StringListAttribute srcs bazel.LabelListAttribute rtti bazel.BoolAttribute } // bp2BuildParseCompilerProps returns copts, srcs and hdrs and other attributes. Loading @@ -249,6 +251,7 @@ func bp2BuildParseCompilerProps(ctx android.TopDownMutatorContext, module *Modul var asFlags bazel.StringListAttribute var conlyFlags bazel.StringListAttribute var cppFlags bazel.StringListAttribute var rtti bazel.BoolAttribute // Creates the -I flags for a directory, while making the directory relative // to the exec root for Bazel to work. Loading Loading @@ -302,6 +305,7 @@ func bp2BuildParseCompilerProps(ctx android.TopDownMutatorContext, module *Modul asFlags.Value = parseCommandLineFlags(baseCompilerProps.Asflags) conlyFlags.Value = parseCommandLineFlags(baseCompilerProps.Conlyflags) cppFlags.Value = parseCommandLineFlags(baseCompilerProps.Cppflags) rtti.Value = baseCompilerProps.Rtti for _, dir := range parseLocalIncludeDirs(baseCompilerProps) { copts.Value = append(copts.Value, includeFlags(dir)...) Loading Loading @@ -345,6 +349,7 @@ func bp2BuildParseCompilerProps(ctx android.TopDownMutatorContext, module *Modul asFlags.SetSelectValue(axis, config, archVariantAsflags) conlyFlags.SetSelectValue(axis, config, parseCommandLineFlags(baseCompilerProps.Conlyflags)) cppFlags.SetSelectValue(axis, config, parseCommandLineFlags(baseCompilerProps.Cppflags)) rtti.SetSelectValue(axis, config, baseCompilerProps.Rtti) } } } Loading Loading @@ -380,6 +385,7 @@ func bp2BuildParseCompilerProps(ctx android.TopDownMutatorContext, module *Modul cSrcs: cSrcs, conlyFlags: conlyFlags, cppFlags: cppFlags, rtti: rtti, } } Loading
cc/library.go +4 −0 Original line number Diff line number Diff line Loading @@ -236,6 +236,7 @@ type bazelCcLibraryAttributes struct { Includes bazel.StringListAttribute Linkopts bazel.StringListAttribute Use_libcrt bazel.BoolAttribute Rtti bazel.BoolAttribute // This is shared only. Version_script bazel.LabelAttribute Loading Loading @@ -323,6 +324,7 @@ func CcLibraryBp2Build(ctx android.TopDownMutatorContext) { Includes: exportedIncludes, Linkopts: linkerAttrs.linkopts, Use_libcrt: linkerAttrs.useLibcrt, Rtti: compilerAttrs.rtti, Version_script: linkerAttrs.versionScript, Loading Loading @@ -2335,6 +2337,7 @@ type bazelCcLibraryStaticAttributes struct { Linkopts bazel.StringListAttribute Linkstatic bool Use_libcrt bazel.BoolAttribute Rtti bazel.BoolAttribute Includes bazel.StringListAttribute Hdrs bazel.LabelListAttribute Loading Loading @@ -2396,6 +2399,7 @@ func ccLibraryStaticBp2BuildInternal(ctx android.TopDownMutatorContext, module * Linkopts: linkerAttrs.linkopts, Linkstatic: true, Use_libcrt: linkerAttrs.useLibcrt, Rtti: compilerAttrs.rtti, Includes: exportedIncludes, Cppflags: compilerAttrs.cppFlags, Loading