ANDROID: build: Switch to hermetic tools for DTC build
Currently, the DTC build will use host tools for lex and bison runs. With the hermetic_genrule from Kleaf, it's easy to use the hermetic tools instead which obviates the need for lex and bison on the host. Switch to hermetic_genrule. Change-Id: Ib505cf3833c8ecec275c50f9c44ff74efe39b649 Signed-off-by: John Moon <quic_johmoo@quicinc.com>
This commit is contained in:
parent
157de4eba3
commit
0d3933f9e4
@ -1,3 +1,5 @@
|
|||||||
|
load("@//build/kernel/kleaf:hermetic_tools.bzl", "hermetic_genrule")
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "libfdt",
|
name = "libfdt",
|
||||||
copts = [
|
copts = [
|
||||||
@ -22,14 +24,14 @@ copts = [
|
|||||||
"-Wno-unused-parameter",
|
"-Wno-unused-parameter",
|
||||||
]
|
]
|
||||||
|
|
||||||
genrule(
|
hermetic_genrule(
|
||||||
name = "lexer",
|
name = "lexer",
|
||||||
srcs = ["dtc-lexer.l"],
|
srcs = ["dtc-lexer.l"],
|
||||||
outs = ["dtc-lexer.lex.c"],
|
outs = ["dtc-lexer.lex.c"],
|
||||||
cmd = "lex -o$@ $(location dtc-lexer.l)"
|
cmd = "flex -o$@ $(location dtc-lexer.l)"
|
||||||
)
|
)
|
||||||
|
|
||||||
genrule(
|
hermetic_genrule(
|
||||||
name = "parser",
|
name = "parser",
|
||||||
srcs = ["dtc-parser.y"],
|
srcs = ["dtc-parser.y"],
|
||||||
outs = ["dtc-parser.tab.c", "dtc-parser.tab.h"],
|
outs = ["dtc-parser.tab.c", "dtc-parser.tab.h"],
|
||||||
|
Loading…
Reference in New Issue
Block a user