Hash :
9f7b6bab
Author :
Date :
2022-09-07T11:01:37
Add minimal setup for Go codegen in Android.bp. Based on Cody's http://ag/19603310. Only adds libEGL_angle_codegen to libEGL_angle and is a no-op. Tested in an aosp checkout. Hopefully this doesn't cause merge conflicts with internal master as all diffs are close to the top of the file. Android.bp diff: https://paste.googleplex.com/6626641357832192 Bug: b/242929755 Change-Id: I6d7ac9f3dd502074c41838bd1aa10075a8c99145 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3876890 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
//
// Copyright 2022 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
package angle_android_codegen
import (
"android/soong/android"
"android/soong/cc"
)
func init() {
android.RegisterModuleType(
"angle_android_codegen", angle_android_codegen_DefaultsFactory)
}
// Values passed in from Android.bp
type angle_android_codegen_Properties struct {
}
func angle_android_codegen_Defaults(g *angle_android_codegen_Properties) func(ctx android.LoadHookContext) {
return func(ctx android.LoadHookContext) {
// Structure to write out new values
type props struct {
}
p := &props{}
ctx.AppendProperties(p)
}
}
func angle_android_codegen_DefaultsFactory() android.Module {
module := cc.DefaultsFactory()
props := &angle_android_codegen_Properties{}
module.AddProperties(props)
android.AddLoadHook(module, angle_android_codegen_Defaults(props))
return module
}