Merge "Fix __ANDROID_SDK_VERSION__=0"
This commit is contained in:
commit
3992b7c486
1 changed files with 13 additions and 13 deletions
26
cc/cc.go
26
cc/cc.go
|
@ -2231,6 +2231,19 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
|
|||
depPaths.ReexportedGeneratedHeaders = append(depPaths.ReexportedGeneratedHeaders, exporter.exportedGeneratedHeaders()...)
|
||||
}
|
||||
|
||||
// For the dependency from platform to apex, use the latest stubs
|
||||
c.apexSdkVersion = android.FutureApiLevel
|
||||
if !c.IsForPlatform() {
|
||||
c.apexSdkVersion = c.ApexProperties.Info.MinSdkVersion
|
||||
}
|
||||
|
||||
if android.InList("hwaddress", ctx.Config().SanitizeDevice()) {
|
||||
// In hwasan build, we override apexSdkVersion to the FutureApiLevel(10000)
|
||||
// so that even Q(29/Android10) apexes could use the dynamic unwinder by linking the newer stubs(e.g libc(R+)).
|
||||
// (b/144430859)
|
||||
c.apexSdkVersion = android.FutureApiLevel
|
||||
}
|
||||
|
||||
ctx.VisitDirectDeps(func(dep android.Module) {
|
||||
depName := ctx.OtherModuleName(dep)
|
||||
depTag := ctx.OtherModuleDependencyTag(dep)
|
||||
|
@ -2334,19 +2347,6 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
|
|||
}
|
||||
}
|
||||
|
||||
// For the dependency from platform to apex, use the latest stubs
|
||||
c.apexSdkVersion = android.FutureApiLevel
|
||||
if !c.IsForPlatform() {
|
||||
c.apexSdkVersion = c.ApexProperties.Info.MinSdkVersion
|
||||
}
|
||||
|
||||
if android.InList("hwaddress", ctx.Config().SanitizeDevice()) {
|
||||
// In hwasan build, we override apexSdkVersion to the FutureApiLevel(10000)
|
||||
// so that even Q(29/Android10) apexes could use the dynamic unwinder by linking the newer stubs(e.g libc(R+)).
|
||||
// (b/144430859)
|
||||
c.apexSdkVersion = android.FutureApiLevel
|
||||
}
|
||||
|
||||
if depTag == staticUnwinderDepTag {
|
||||
// Use static unwinder for legacy (min_sdk_version = 29) apexes (b/144430859)
|
||||
if c.apexSdkVersion <= android.SdkVersion_Android10 {
|
||||
|
|
Loading…
Reference in a new issue