diff options
author | 2020-03-09 20:23:15 +0000 | |
---|---|---|
committer | 2020-03-09 20:23:15 +0000 | |
commit | a81668628e7ccda49291c4b4779b02f4772affe2 (patch) | |
tree | 9234818cbe4c704435f4b490d8bc22a843e31ef9 /cc/testing.go | |
parent | a8e37b98bba2a8bf61d01b20994ced119a0387be (diff) | |
parent | a04c107bfaf9262daafecc9174bd9e85b79264bd (diff) |
Merge "Add support for multiple os types"
Diffstat (limited to 'cc/testing.go')
-rw-r--r-- | cc/testing.go | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/cc/testing.go b/cc/testing.go index a22763a92..b8a7eab34 100644 --- a/cc/testing.go +++ b/cc/testing.go @@ -34,7 +34,7 @@ func RegisterRequiredBuildComponentsForTest(ctx android.RegistrationContext) { ctx.RegisterModuleType("ndk_prebuilt_object", NdkPrebuiltObjectFactory) } -func GatherRequiredDepsForTest(os android.OsType) string { +func GatherRequiredDepsForTest(oses ...android.OsType) string { ret := ` toolchain_library { name: "libatomic", @@ -341,8 +341,9 @@ func GatherRequiredDepsForTest(os android.OsType) string { } ` - if os == android.Fuchsia { - ret += ` + for _, os := range oses { + if os == android.Fuchsia { + ret += ` cc_library { name: "libbioniccompat", stl: "none", @@ -352,6 +353,22 @@ func GatherRequiredDepsForTest(os android.OsType) string { stl: "none", } ` + } + if os == android.Windows { + ret += ` + toolchain_library { + name: "libwinpthread", + host_supported: true, + enabled: false, + target: { + windows: { + enabled: true, + }, + }, + src: "", + } + ` + } } return ret } |