Move platform constraints to bazel_common_rules.
This enables sharing of platform constraints between platform and kernel builds. Bug: 304594734 Test: treehugger Change-Id: I48091eeaf2e529c3f180ba056da3935911868b14
This commit is contained in:
@@ -693,11 +693,11 @@ func makeBazelTargetHostOrDevice(typ, name string, attrs AttrNameToString, hod a
|
||||
switch hod {
|
||||
case android.HostSupported:
|
||||
attrs["target_compatible_with"] = `select({
|
||||
"//build/bazel/platforms/os:android": ["@platforms//:incompatible"],
|
||||
"//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
|
||||
"//conditions:default": [],
|
||||
})`
|
||||
case android.DeviceSupported:
|
||||
attrs["target_compatible_with"] = `["//build/bazel/platforms/os:android"]`
|
||||
attrs["target_compatible_with"] = `["//build/bazel_common_rules/platforms/os:android"]`
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user