Merge "Revert "Switch NDK libc++ from prebuilts/ndk to prebuilts/clang"" into main
This commit is contained in:
24
cc/cc.go
24
cc/cc.go
@@ -1028,6 +1028,13 @@ func (c *Module) SelectedStl() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (c *Module) NdkPrebuiltStl() bool {
|
||||
if _, ok := c.linker.(*ndkPrebuiltStlLinker); ok {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (c *Module) StubDecorator() bool {
|
||||
if _, ok := c.linker.(*stubDecorator); ok {
|
||||
return true
|
||||
@@ -1081,6 +1088,16 @@ func (c *Module) CcLibraryInterface() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (c *Module) IsNdkPrebuiltStl() bool {
|
||||
if c.linker == nil {
|
||||
return false
|
||||
}
|
||||
if _, ok := c.linker.(*ndkPrebuiltStlLinker); ok {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (c *Module) RlibStd() bool {
|
||||
panic(fmt.Errorf("RlibStd called on non-Rust module: %q", c.BaseModuleName()))
|
||||
}
|
||||
@@ -2737,6 +2754,10 @@ func checkLinkType(ctx android.BaseModuleContext, from LinkableInterface, to Lin
|
||||
return
|
||||
}
|
||||
if c, ok := to.(*Module); ok {
|
||||
if c.NdkPrebuiltStl() {
|
||||
// These are allowed, but they don't set sdk_version
|
||||
return
|
||||
}
|
||||
if c.StubDecorator() {
|
||||
// These aren't real libraries, but are the stub shared libraries that are included in
|
||||
// the NDK.
|
||||
@@ -3906,6 +3927,7 @@ const (
|
||||
headerLibrary
|
||||
testBin // testBinary already declared
|
||||
ndkLibrary
|
||||
ndkPrebuiltStl
|
||||
)
|
||||
|
||||
func (c *Module) typ() moduleType {
|
||||
@@ -3944,6 +3966,8 @@ func (c *Module) typ() moduleType {
|
||||
return sharedLibrary
|
||||
} else if c.isNDKStubLibrary() {
|
||||
return ndkLibrary
|
||||
} else if c.IsNdkPrebuiltStl() {
|
||||
return ndkPrebuiltStl
|
||||
}
|
||||
return unknownType
|
||||
}
|
||||
|
Reference in New Issue
Block a user