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

Commit 792942de authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I75b4a761,I779f28c6,If1422372,I26307dd1

* changes:
  Introduce inject_bssl_hash library property.
  BoringSSL FIPS build - introduce extraLibFlags and use for STL libs.
  Allow linker scripts when building objects.
  Allow .o files as srcs.
parents b020d570 803e161a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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",
+4 −0
Original line number Diff line number Diff line
@@ -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())
}
+12 −7
Original line number Diff line number Diff line
@@ -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{
@@ -259,6 +259,7 @@ type builderFlags struct {
	cppFlags        string
	ldFlags         string
	libFlags        string
	extraLibFlags   string
	tidyFlags       string
	sAbiFlags       string
	yasmFlags       string
@@ -411,6 +412,9 @@ func TransformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles and
				},
			})
			continue
		case ".o":
			objFiles[i] = srcFile
			continue
		}

		var moduleCflags string
@@ -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(),
		},
+1 −11
Original line number Diff line number Diff line
@@ -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
@@ -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.
+1 −1
Original line number Diff line number Diff line
@@ -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