Reformat build/soong for go 1.19
Test: none
Change-Id: I132368f0fcbdb5ea088b5b84dbe4ccfdd9e94cad
diff --git a/cc/afdo.go b/cc/afdo.go
index 66e9732..fb66bbe 100644
--- a/cc/afdo.go
+++ b/cc/afdo.go
@@ -66,8 +66,9 @@
}
// Get list of profile file names, ordered by level of specialisation. For example:
-// 1. libfoo_arm64.afdo
-// 2. libfoo.afdo
+// 1. libfoo_arm64.afdo
+// 2. libfoo.afdo
+//
// Add more specialisation as needed.
func getProfileFiles(ctx android.BaseModuleContext, moduleName string) []string {
var files []string
diff --git a/cc/fuzz.go b/cc/fuzz.go
index dfc718e..8a8c107 100644
--- a/cc/fuzz.go
+++ b/cc/fuzz.go
@@ -152,10 +152,10 @@
// IsValidSharedDependency takes a module and determines if it is a unique shared library
// that should be installed in the fuzz target output directories. This function
// returns true, unless:
-// - The module is not an installable shared library, or
-// - The module is a header or stub, or
-// - The module is a prebuilt and its source is available, or
-// - The module is a versioned member of an SDK snapshot.
+// - The module is not an installable shared library, or
+// - The module is a header or stub, or
+// - The module is a prebuilt and its source is available, or
+// - The module is a versioned member of an SDK snapshot.
func IsValidSharedDependency(dependency android.Module) bool {
// TODO(b/144090547): We should be parsing these modules using
// ModuleDependencyTag instead of the current brute-force checking.
diff --git a/cc/genrule.go b/cc/genrule.go
index 239064f..4ef990c 100644
--- a/cc/genrule.go
+++ b/cc/genrule.go
@@ -41,13 +41,13 @@
// variations. The following environment variables will be set when the command
// execute:
//
-// CC_ARCH the name of the architecture the command is being executed for
+// CC_ARCH the name of the architecture the command is being executed for
//
-// CC_MULTILIB "lib32" if the architecture the command is being executed for is 32-bit,
-// "lib64" if it is 64-bit.
+// CC_MULTILIB "lib32" if the architecture the command is being executed for is 32-bit,
+// "lib64" if it is 64-bit.
//
-// CC_NATIVE_BRIDGE the name of the subdirectory that native bridge libraries are stored in if
-// the architecture has native bridge enabled, empty if it is disabled.
+// CC_NATIVE_BRIDGE the name of the subdirectory that native bridge libraries are stored in if
+// the architecture has native bridge enabled, empty if it is disabled.
func GenRuleFactory() android.Module {
module := genrule.NewGenRule()
diff --git a/cc/image.go b/cc/image.go
index 921b2bb..e65a9aa 100644
--- a/cc/image.go
+++ b/cc/image.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/cc/ndk_headers.go b/cc/ndk_headers.go
index 56fd5fc..ef38a06 100644
--- a/cc/ndk_headers.go
+++ b/cc/ndk_headers.go
@@ -148,12 +148,12 @@
// to the sysroot base + "usr/include" + to directory + directory component.
// ndk_headers requires the license file to be specified. Example:
//
-// Given:
-// sysroot base = "ndk/sysroot"
-// from = "include/foo"
-// to = "bar"
-// header = "include/foo/woodly/doodly.h"
-// output path = "ndk/sysroot/usr/include/bar/woodly/doodly.h"
+// Given:
+// sysroot base = "ndk/sysroot"
+// from = "include/foo"
+// to = "bar"
+// header = "include/foo/woodly/doodly.h"
+// output path = "ndk/sysroot/usr/include/bar/woodly/doodly.h"
func ndkHeadersFactory() android.Module {
module := &headerModule{}
module.AddProperties(&module.properties)
@@ -275,15 +275,17 @@
return module
}
-// preprocessed_ndk_header {
-// name: "foo",
-// preprocessor: "foo.sh",
-// srcs: [...],
-// to: "android",
-// }
+// preprocessed_ndk_header {
+// name: "foo",
+// preprocessor: "foo.sh",
+// srcs: [...],
+// to: "android",
+// }
//
// Will invoke the preprocessor as:
-// $preprocessor -o $SYSROOT/usr/include/android/needs_preproc.h $src
+//
+// $preprocessor -o $SYSROOT/usr/include/android/needs_preproc.h $src
+//
// For each src in srcs.
type preprocessedHeadersProperties struct {
// The preprocessor to run. Must be a program inside the source directory
diff --git a/cc/ndk_library.go b/cc/ndk_library.go
index 0879257..2bbfc4a 100644
--- a/cc/ndk_library.go
+++ b/cc/ndk_library.go
@@ -84,12 +84,11 @@
//
// Example:
//
-// ndk_library {
-// name: "libfoo",
-// symbol_file: "libfoo.map.txt",
-// first_version: "9",
-// }
-//
+// ndk_library {
+// name: "libfoo",
+// symbol_file: "libfoo.map.txt",
+// first_version: "9",
+// }
type libraryProperties struct {
// Relative path to the symbol map.
// An example file can be seen here: TODO(danalbert): Make an example.
diff --git a/cc/prebuilt.go b/cc/prebuilt.go
index 8c404d3..a2d4503 100644
--- a/cc/prebuilt.go
+++ b/cc/prebuilt.go
@@ -348,10 +348,10 @@
// TODO(b/228623543): The below is not entirely true until the bug is fixed. For now, both targets are always generated
// Implements bp2build for cc_prebuilt_library modules. This will generate:
-// * Only a prebuilt_library_static if the shared.enabled property is set to false across all variants.
-// * Only a prebuilt_library_shared if the static.enabled property is set to false across all variants
-// * Both a prebuilt_library_static and prebuilt_library_shared if the aforementioned properties are not false across
-// all variants
+// - Only a prebuilt_library_static if the shared.enabled property is set to false across all variants.
+// - Only a prebuilt_library_shared if the static.enabled property is set to false across all variants
+// - Both a prebuilt_library_static and prebuilt_library_shared if the aforementioned properties are not false across
+// all variants
//
// In all cases, prebuilt_library_static target names will be appended with "_bp2build_cc_library_static".
func prebuiltLibraryBp2Build(ctx android.TopDownMutatorContext, module *Module) {
diff --git a/cc/snapshot_prebuilt.go b/cc/snapshot_prebuilt.go
index 9d40ad0..792ffe3 100644
--- a/cc/snapshot_prebuilt.go
+++ b/cc/snapshot_prebuilt.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@@ -263,12 +263,12 @@
// version, snapshot arch, etc. It also adds a special suffix to Soong module name, so it doesn't
// collide with source modules. e.g. the following example module,
//
-// vendor_snapshot_static {
-// name: "libbase",
-// arch: "arm64",
-// version: 30,
-// ...
-// }
+// vendor_snapshot_static {
+// name: "libbase",
+// arch: "arm64",
+// version: 30,
+// ...
+// }
//
// will be seen as "libbase.vendor_static.30.arm64" by Soong.
type BaseSnapshotDecorator struct {
@@ -370,7 +370,6 @@
}
}
-//
// Module definitions for snapshots of libraries (shared, static, header).
//
// Modules (vendor|recovery)_snapshot_(shared|static|header) are defined here. Shared libraries and
@@ -630,7 +629,6 @@
var _ snapshotSanitizer = (*snapshotLibraryDecorator)(nil)
-//
// Module definitions for snapshots of executable binaries.
//
// Modules (vendor|recovery)_snapshot_binary are defined here. They have their prebuilt executable
@@ -728,7 +726,6 @@
return module.Init()
}
-//
// Module definitions for snapshots of object files (*.o).
//
// Modules (vendor|recovery)_snapshot_object are defined here. They have their prebuilt object
diff --git a/cc/snapshot_utils.go b/cc/snapshot_utils.go
index de50ef5..cf4617d 100644
--- a/cc/snapshot_utils.go
+++ b/cc/snapshot_utils.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/cc/vendor_public_library.go b/cc/vendor_public_library.go
index 65a2b0c..f2c8545 100644
--- a/cc/vendor_public_library.go
+++ b/cc/vendor_public_library.go
@@ -28,17 +28,16 @@
//
// Example:
//
-// vendor_public_library {
-// name: "libfoo",
-// symbol_file: "libfoo.map.txt",
-// export_public_headers: ["libfoo_headers"],
-// }
+// vendor_public_library {
+// name: "libfoo",
+// symbol_file: "libfoo.map.txt",
+// export_public_headers: ["libfoo_headers"],
+// }
//
-// cc_headers {
-// name: "libfoo_headers",
-// export_include_dirs: ["include"],
-// }
-//
+// cc_headers {
+// name: "libfoo_headers",
+// export_include_dirs: ["include"],
+// }
type vendorPublicLibraryProperties struct {
// Relative path to the symbol map.
Symbol_file *string
diff --git a/cc/vendor_snapshot.go b/cc/vendor_snapshot.go
index e7c05ac..77e6f6f 100644
--- a/cc/vendor_snapshot.go
+++ b/cc/vendor_snapshot.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/cc/vndk_prebuilt.go b/cc/vndk_prebuilt.go
index 31b6d10..37819a4 100644
--- a/cc/vndk_prebuilt.go
+++ b/cc/vndk_prebuilt.go
@@ -29,26 +29,25 @@
//
// Example:
//
-// vndk_prebuilt_shared {
-// name: "libfoo",
-// version: "27",
-// target_arch: "arm64",
-// vendor_available: true,
-// product_available: true,
-// vndk: {
-// enabled: true,
-// },
-// export_include_dirs: ["include/external/libfoo/vndk_include"],
-// arch: {
-// arm64: {
-// srcs: ["arm/lib64/libfoo.so"],
-// },
-// arm: {
-// srcs: ["arm/lib/libfoo.so"],
-// },
-// },
-// }
-//
+// vndk_prebuilt_shared {
+// name: "libfoo",
+// version: "27",
+// target_arch: "arm64",
+// vendor_available: true,
+// product_available: true,
+// vndk: {
+// enabled: true,
+// },
+// export_include_dirs: ["include/external/libfoo/vndk_include"],
+// arch: {
+// arm64: {
+// srcs: ["arm/lib64/libfoo.so"],
+// },
+// arm: {
+// srcs: ["arm/lib/libfoo.so"],
+// },
+// },
+// }
type vndkPrebuiltProperties struct {
// VNDK snapshot version.
Version *string
@@ -250,25 +249,25 @@
// vndk_prebuilt_shared installs Vendor Native Development kit (VNDK) snapshot
// shared libraries for system build. Example:
//
-// vndk_prebuilt_shared {
-// name: "libfoo",
-// version: "27",
-// target_arch: "arm64",
-// vendor_available: true,
-// product_available: true,
-// vndk: {
-// enabled: true,
-// },
-// export_include_dirs: ["include/external/libfoo/vndk_include"],
-// arch: {
-// arm64: {
-// srcs: ["arm/lib64/libfoo.so"],
-// },
-// arm: {
-// srcs: ["arm/lib/libfoo.so"],
-// },
-// },
-// }
+// vndk_prebuilt_shared {
+// name: "libfoo",
+// version: "27",
+// target_arch: "arm64",
+// vendor_available: true,
+// product_available: true,
+// vndk: {
+// enabled: true,
+// },
+// export_include_dirs: ["include/external/libfoo/vndk_include"],
+// arch: {
+// arm64: {
+// srcs: ["arm/lib64/libfoo.so"],
+// },
+// arm: {
+// srcs: ["arm/lib/libfoo.so"],
+// },
+// },
+// }
func VndkPrebuiltSharedFactory() android.Module {
module := vndkPrebuiltSharedLibrary()
return module.Init()