Add cc_prebuilt_object.
To be used for prebuilt object support in SDK snapshots. Test: m nothing Bug: 148934017 Change-Id: I53d58100cc1d410c5cf5b7906de7ed6f7add2035
This commit is contained in:
11
cc/object.go
11
cc/object.go
@@ -47,12 +47,18 @@ type ObjectLinkerProperties struct {
|
||||
Linker_script *string `android:"path,arch_variant"`
|
||||
}
|
||||
|
||||
func newObject() *Module {
|
||||
module := newBaseModule(android.HostAndDeviceSupported, android.MultilibBoth)
|
||||
module.sanitize = &sanitize{}
|
||||
module.stl = &stl{}
|
||||
return module
|
||||
}
|
||||
|
||||
// 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.
|
||||
func ObjectFactory() android.Module {
|
||||
module := newBaseModule(android.HostAndDeviceSupported, android.MultilibBoth)
|
||||
module.sanitize = &sanitize{}
|
||||
module := newObject()
|
||||
module.linker = &objectLinker{
|
||||
baseLinker: NewBaseLinker(module.sanitize),
|
||||
}
|
||||
@@ -61,7 +67,6 @@ func ObjectFactory() android.Module {
|
||||
// Clang's address-significance tables are incompatible with ld -r.
|
||||
module.compiler.appendCflags([]string{"-fno-addrsig"})
|
||||
|
||||
module.stl = &stl{}
|
||||
return module.Init()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user