ANDROID: build: Set DTC target compatibility

Currently, there's no guarantee that the device tree compiler in our
build is being built for the host target.

Use native Bazel compatibility attributes to make sure DTC is only
built for linux (not Android).

Change-Id: Ibe06aa76004caf6e087f11e29679c045c68ab129
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
This commit is contained in:
John Moon 2023-03-21 12:43:59 -07:00
parent 816738a684
commit 1a3639b2f2

View File

@ -10,6 +10,7 @@ cc_library(
"libfdt/*.h",
"libfdt/*.c",
]),
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
@ -48,6 +49,7 @@ cc_library(
] + glob(["*.h"]),
includes = ["."],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
@ -68,6 +70,7 @@ cc_binary(
] + glob(["*.h"]),
includes = ["."],
deps = [":libfdt", ":dtc_gen"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
@ -82,6 +85,7 @@ cc_binary(
"version_non_gen.h",
],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
@ -96,6 +100,7 @@ cc_binary(
"version_non_gen.h",
],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
@ -110,6 +115,7 @@ cc_binary(
"version_non_gen.h",
],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
@ -124,6 +130,7 @@ cc_binary(
"version_non_gen.h",
],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
@ -138,6 +145,7 @@ cc_binary(
"version_non_gen.h",
],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)