File tree 1 file changed +16
-6
lines changed
1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change
1
+ load ("@bazel_skylib//rules:run_binary.bzl" , "run_binary" )
1
2
load ("@rules_cc//cc:defs.bzl" , "cc_library" )
2
3
3
4
def rust_cxx_bridge (
@@ -6,20 +7,29 @@ def rust_cxx_bridge(
6
7
include_prefix = None ,
7
8
strip_include_prefix = None ,
8
9
deps = []):
9
- native . genrule (
10
+ run_binary (
10
11
name = "%s/header" % name ,
11
12
srcs = [src ],
12
13
outs = [src + ".h" ],
13
- cmd = "$(location //:codegen) --header $< > $@" ,
14
- tools = ["//:codegen" ],
14
+ args = [
15
+ "$(location %s)" % src ,
16
+ "-o" ,
17
+ "$(location %s.h)" % src ,
18
+ "--header" ,
19
+ ],
20
+ tool = "//:codegen" ,
15
21
)
16
22
17
- native . genrule (
23
+ run_binary (
18
24
name = "%s/source" % name ,
19
25
srcs = [src ],
20
26
outs = [src + ".cc" ],
21
- cmd = "$(location //:codegen) $< > $@" ,
22
- tools = ["//:codegen" ],
27
+ args = [
28
+ "$(location %s)" % src ,
29
+ "-o" ,
30
+ "$(location %s.cc)" % src ,
31
+ ],
32
+ tool = "//:codegen" ,
23
33
)
24
34
25
35
cc_library (
You can’t perform that action at this time.
0 commit comments