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.
This commit is contained in:
20
cc/object.go
20
cc/object.go
@@ -33,6 +33,20 @@ type objectLinker struct {
|
||||
Properties ObjectLinkerProperties
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
// if set, the path to a linker script to pass to ld -r when combining multiple object files.
|
||||
Linker_script *string `android:"path,arch_variant"`
|
||||
}
|
||||
|
||||
// cc_object runs the compiler without running the linker. It is rarely
|
||||
// necessary, but sometimes used to generate .s files from .c files to use as
|
||||
// input to a cc_genrule module.
|
||||
@@ -71,9 +85,13 @@ func (object *objectLinker) linkerDeps(ctx DepsContext, deps Deps) Deps {
|
||||
return deps
|
||||
}
|
||||
|
||||
func (*objectLinker) linkerFlags(ctx ModuleContext, flags Flags) Flags {
|
||||
func (object *objectLinker) linkerFlags(ctx ModuleContext, flags Flags) Flags {
|
||||
flags.LdFlags = append(flags.LdFlags, ctx.toolchain().ToolchainClangLdflags())
|
||||
|
||||
if lds := android.OptionalPathForModuleSrc(ctx, object.Properties.Linker_script); lds.Valid() {
|
||||
flags.LdFlags = append(flags.LdFlags, "-Wl,-T,"+lds.String())
|
||||
flags.LdFlagsDeps = append(flags.LdFlagsDeps, lds.Path())
|
||||
}
|
||||
return flags
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user