summaryrefslogtreecommitdiff
path: root/cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc')
-rw-r--r--cc/binary_sdk_member.go2
-rw-r--r--cc/library_sdk_member.go2
-rw-r--r--cc/testing.go23
3 files changed, 22 insertions, 5 deletions
diff --git a/cc/binary_sdk_member.go b/cc/binary_sdk_member.go
index eddf5b805..fc9b89e75 100644
--- a/cc/binary_sdk_member.go
+++ b/cc/binary_sdk_member.go
@@ -78,7 +78,7 @@ const (
// path to the native binary. Relative to <sdk_root>/<api_dir>
func nativeBinaryPathFor(lib nativeBinaryInfoProperties) string {
- return filepath.Join(lib.archType,
+ return filepath.Join(lib.OsPrefix(), lib.archType,
nativeBinaryDir, lib.outputFile.Base())
}
diff --git a/cc/library_sdk_member.go b/cc/library_sdk_member.go
index a26269772..656df6969 100644
--- a/cc/library_sdk_member.go
+++ b/cc/library_sdk_member.go
@@ -254,7 +254,7 @@ const (
// path to the native library. Relative to <sdk_root>/<api_dir>
func nativeLibraryPathFor(lib *nativeLibInfoProperties) string {
- return filepath.Join(lib.archType,
+ return filepath.Join(lib.OsPrefix(), lib.archType,
nativeStubDir, lib.outputFile.Base())
}
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
}