aboutsummaryrefslogtreecommitdiff
path: root/dexpreopt
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2022-08-16 10:27:33 -0700
committerColin Cross <ccross@android.com>2022-08-17 10:43:13 -0700
commitd079e0b2708ce0f4cce470db929f28dd8d2b0e80 (patch)
treee8cdb4a59bd88411a262a1d91bd75def56cc4de2 /dexpreopt
parent852d0c48593fb2a17d301d7274edac907e8e194f (diff)
Reformat build/soong for go 1.19
Test: none Change-Id: I132368f0fcbdb5ea088b5b84dbe4ccfdd9e94cad
Diffstat (limited to 'dexpreopt')
-rw-r--r--dexpreopt/class_loader_context.go32
1 files changed, 15 insertions, 17 deletions
diff --git a/dexpreopt/class_loader_context.go b/dexpreopt/class_loader_context.go
index 7bc9ab261..afb3de38a 100644
--- a/dexpreopt/class_loader_context.go
+++ b/dexpreopt/class_loader_context.go
@@ -25,11 +25,11 @@ import (
)
// This comment describes the following:
-// 1. the concept of class loader context (CLC) and its relation to classpath
-// 2. how PackageManager constructs CLC from shared libraries and their dependencies
-// 3. build-time vs. run-time CLC and why this matters for dexpreopt
-// 4. manifest fixer: a tool that adds missing <uses-library> tags to the manifests
-// 5. build system support for CLC
+// 1. the concept of class loader context (CLC) and its relation to classpath
+// 2. how PackageManager constructs CLC from shared libraries and their dependencies
+// 3. build-time vs. run-time CLC and why this matters for dexpreopt
+// 4. manifest fixer: a tool that adds missing <uses-library> tags to the manifests
+// 5. build system support for CLC
//
// 1. Class loader context
// -----------------------
@@ -59,15 +59,16 @@ import (
// loaders are not duplicated (at runtime there is a single class loader instance for each library).
//
// Example: A has <uses-library> tags B, C and D; C has <uses-library tags> B and D;
-// D has <uses-library> E; B and E have no <uses-library> dependencies. The CLC is:
-// A
-// ├── B
-// ├── C
-// │ ├── B
-// │ └── D
-// │ └── E
-// └── D
-// └── E
+//
+// D has <uses-library> E; B and E have no <uses-library> dependencies. The CLC is:
+// A
+// ├── B
+// ├── C
+// │ ├── B
+// │ └── D
+// │ └── E
+// └── D
+// └── E
//
// CLC defines the lookup order of libraries when resolving Java classes used by the library/app.
// The lookup order is important because libraries may contain duplicate classes, and the class is
@@ -188,7 +189,6 @@ import (
// rule generation phase.
//
// ClassLoaderContext is a structure that represents CLC.
-//
type ClassLoaderContext struct {
// The name of the library.
Name string
@@ -249,7 +249,6 @@ func (c *ClassLoaderContext) excludeLibs(excludedLibs []string) (*ClassLoaderCon
// generates a build rule that includes conditional CLC for all versions, extracts the target SDK
// version from the manifest, and filters the CLCs based on that version. Exact final CLC that is
// passed to dex2oat is unknown to the build system, and gets known only at Ninja stage.
-//
type ClassLoaderContextMap map[int][]*ClassLoaderContext
// Compatibility libraries. Some are optional, and some are required: this is the default that
@@ -485,7 +484,6 @@ func (clcMap ClassLoaderContextMap) ExcludeLibs(excludedLibs []string) ClassLoad
// constructs class loader context on device.
//
// TODO(b/132357300): remove "android.hidl.manager" and "android.hidl.base" for non-system apps.
-//
func fixClassLoaderContext(clcMap ClassLoaderContextMap) {
required, optional := clcMap.UsesLibs()
usesLibs := append(required, optional...)