Loading Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -204,6 +204,7 @@ bootstrap_go_package { "cc/gen_test.go", "cc/genrule_test.go", "cc/library_test.go", "cc/object_test.go", "cc/prebuilt_test.go", "cc/proto_test.go", "cc/test_data_test.go", Loading android/paths.go +4 −0 Original line number Diff line number Diff line Loading @@ -989,6 +989,10 @@ type ModuleOutPath struct { var _ Path = ModuleOutPath{} func (p ModuleOutPath) objPathWithExt(ctx ModuleContext, subdir, ext string) ModuleObjPath { return PathForModuleObj(ctx, subdir, pathtools.ReplaceExtension(p.path, ext)) } func pathForModule(ctx ModuleContext) OutputPath { return PathForOutput(ctx, ".intermediates", ctx.ModuleDir(), ctx.ModuleName(), ctx.ModuleSubDir()) } Loading cc/builder.go +12 −7 Original line number Diff line number Diff line Loading @@ -65,14 +65,14 @@ var ( ld = pctx.AndroidStaticRule("ld", blueprint.RuleParams{ Command: "$ldCmd ${crtBegin} @${out}.rsp " + "${libFlags} ${crtEnd} -o ${out} ${ldFlags}", "${libFlags} ${crtEnd} -o ${out} ${ldFlags} ${extraLibFlags}", CommandDeps: []string{"$ldCmd"}, Rspfile: "${out}.rsp", RspfileContent: "${in}", // clang -Wl,--out-implib doesn't update its output file if it hasn't changed. Restat: true, }, "ldCmd", "crtBegin", "libFlags", "crtEnd", "ldFlags") "ldCmd", "crtBegin", "libFlags", "crtEnd", "ldFlags", "extraLibFlags") partialLd = pctx.AndroidStaticRule("partialLd", blueprint.RuleParams{ Loading Loading @@ -259,6 +259,7 @@ type builderFlags struct { cppFlags string ldFlags string libFlags string extraLibFlags string tidyFlags string sAbiFlags string yasmFlags string Loading Loading @@ -411,6 +412,9 @@ func TransformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles and }, }) continue case ".o": objFiles[i] = srcFile continue } var moduleCflags string Loading Loading @@ -630,6 +634,7 @@ func TransformObjToDynamicBinary(ctx android.ModuleContext, "ldCmd": ldCmd, "crtBegin": crtBegin.String(), "libFlags": strings.Join(libFlagsList, " "), "extraLibFlags": flags.extraLibFlags, "ldFlags": flags.ldFlags, "crtEnd": crtEnd.String(), }, Loading cc/cc.go +1 −11 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ type Flags struct { rsFlags []string // Flags that apply to renderscript source files LdFlags []string // Flags that apply to linker command lines libFlags []string // Flags to add libraries early to the link order extraLibFlags []string // Flags to add libraries late in the link order after LdFlags TidyFlags []string // Flags that apply to clang-tidy SAbiFlags []string // Flags that apply to header-abi-dumper YasmFlags []string // Flags that apply to yasm assembly source files Loading Loading @@ -182,17 +183,6 @@ type Flags struct { Yacc *YaccProperties } type ObjectLinkerProperties struct { // list of modules that should only provide headers for this module. Header_libs []string `android:"arch_variant,variant_prepend"` // names of other cc_object modules to link into this module using partial linking Objs []string `android:"arch_variant"` // if set, add an extra objcopy --prefix-symbols= step Prefix_symbols *string } // Properties used to compile all C or C++ modules type BaseProperties struct { // Deprecated. true is the default, false is invalid. Loading cc/cc_test.go +1 −1 Original line number Diff line number Diff line Loading @@ -2203,7 +2203,7 @@ func TestStaticExecutable(t *testing.T) { ctx := testCc(t, ` cc_binary { name: "static_test", srcs: ["foo.c"], srcs: ["foo.c", "baz.o"], static_executable: true, }`) Loading Loading
Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -204,6 +204,7 @@ bootstrap_go_package { "cc/gen_test.go", "cc/genrule_test.go", "cc/library_test.go", "cc/object_test.go", "cc/prebuilt_test.go", "cc/proto_test.go", "cc/test_data_test.go", Loading
android/paths.go +4 −0 Original line number Diff line number Diff line Loading @@ -989,6 +989,10 @@ type ModuleOutPath struct { var _ Path = ModuleOutPath{} func (p ModuleOutPath) objPathWithExt(ctx ModuleContext, subdir, ext string) ModuleObjPath { return PathForModuleObj(ctx, subdir, pathtools.ReplaceExtension(p.path, ext)) } func pathForModule(ctx ModuleContext) OutputPath { return PathForOutput(ctx, ".intermediates", ctx.ModuleDir(), ctx.ModuleName(), ctx.ModuleSubDir()) } Loading
cc/builder.go +12 −7 Original line number Diff line number Diff line Loading @@ -65,14 +65,14 @@ var ( ld = pctx.AndroidStaticRule("ld", blueprint.RuleParams{ Command: "$ldCmd ${crtBegin} @${out}.rsp " + "${libFlags} ${crtEnd} -o ${out} ${ldFlags}", "${libFlags} ${crtEnd} -o ${out} ${ldFlags} ${extraLibFlags}", CommandDeps: []string{"$ldCmd"}, Rspfile: "${out}.rsp", RspfileContent: "${in}", // clang -Wl,--out-implib doesn't update its output file if it hasn't changed. Restat: true, }, "ldCmd", "crtBegin", "libFlags", "crtEnd", "ldFlags") "ldCmd", "crtBegin", "libFlags", "crtEnd", "ldFlags", "extraLibFlags") partialLd = pctx.AndroidStaticRule("partialLd", blueprint.RuleParams{ Loading Loading @@ -259,6 +259,7 @@ type builderFlags struct { cppFlags string ldFlags string libFlags string extraLibFlags string tidyFlags string sAbiFlags string yasmFlags string Loading Loading @@ -411,6 +412,9 @@ func TransformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles and }, }) continue case ".o": objFiles[i] = srcFile continue } var moduleCflags string Loading Loading @@ -630,6 +634,7 @@ func TransformObjToDynamicBinary(ctx android.ModuleContext, "ldCmd": ldCmd, "crtBegin": crtBegin.String(), "libFlags": strings.Join(libFlagsList, " "), "extraLibFlags": flags.extraLibFlags, "ldFlags": flags.ldFlags, "crtEnd": crtEnd.String(), }, Loading
cc/cc.go +1 −11 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ type Flags struct { rsFlags []string // Flags that apply to renderscript source files LdFlags []string // Flags that apply to linker command lines libFlags []string // Flags to add libraries early to the link order extraLibFlags []string // Flags to add libraries late in the link order after LdFlags TidyFlags []string // Flags that apply to clang-tidy SAbiFlags []string // Flags that apply to header-abi-dumper YasmFlags []string // Flags that apply to yasm assembly source files Loading Loading @@ -182,17 +183,6 @@ type Flags struct { Yacc *YaccProperties } type ObjectLinkerProperties struct { // list of modules that should only provide headers for this module. Header_libs []string `android:"arch_variant,variant_prepend"` // names of other cc_object modules to link into this module using partial linking Objs []string `android:"arch_variant"` // if set, add an extra objcopy --prefix-symbols= step Prefix_symbols *string } // Properties used to compile all C or C++ modules type BaseProperties struct { // Deprecated. true is the default, false is invalid. Loading
cc/cc_test.go +1 −1 Original line number Diff line number Diff line Loading @@ -2203,7 +2203,7 @@ func TestStaticExecutable(t *testing.T) { ctx := testCc(t, ` cc_binary { name: "static_test", srcs: ["foo.c"], srcs: ["foo.c", "baz.o"], static_executable: true, }`) Loading