mirror of
https://github.com/topjohnwu/cxx.git
synced 2024-11-23 20:09:55 +00:00
Combine buck codegen steps into one run of cxxbridge
This commit is contained in:
parent
d1ca05aa1c
commit
0489527aec
@ -3,17 +3,21 @@ load("//tools/buck:genrule.bzl", "genrule")
|
||||
def rust_cxx_bridge(name, src, deps = []):
|
||||
genrule(
|
||||
name = "%s/header" % name,
|
||||
srcs = [src],
|
||||
out = src + ".h",
|
||||
cmd = "$(exe //:codegen) ${SRCS} -o ${OUT}",
|
||||
type = "cxxbridge",
|
||||
cmd = "cp $(location :%s/generated)/generated.h ${OUT}" % name,
|
||||
)
|
||||
|
||||
genrule(
|
||||
name = "%s/source" % name,
|
||||
srcs = [src],
|
||||
out = src + ".cc",
|
||||
cmd = "$(exe //:codegen) ${SRCS} -o ${OUT}",
|
||||
cmd = "cp $(location :%s/generated)/generated.cc ${OUT}" % name,
|
||||
)
|
||||
|
||||
genrule(
|
||||
name = "%s/generated" % name,
|
||||
srcs = [src],
|
||||
out = ".",
|
||||
cmd = "$(exe //:codegen) ${SRCS} -o ${OUT}/generated.h -o ${OUT}/generated.cc",
|
||||
type = "cxxbridge",
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user