File tree 1 file changed +16
-14
lines changed
1 file changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -7,40 +7,42 @@ def rust_cxx_bridge(
7
7
include_prefix = None ,
8
8
strip_include_prefix = None ,
9
9
deps = []):
10
- run_binary (
10
+ native . alias (
11
11
name = "%s/header" % name ,
12
- srcs = [src ],
13
- outs = [src + ".h" ],
14
- args = [
15
- "$(location %s)" % src ,
16
- "-o" ,
17
- "$(location %s.h)" % src ,
18
- "--header" ,
19
- ],
20
- tool = "//:codegen" ,
12
+ actual = src + ".h" ,
21
13
)
22
14
23
- run_binary (
15
+ native . alias (
24
16
name = "%s/source" % name ,
17
+ actual = src + ".cc" ,
18
+ )
19
+
20
+ run_binary (
21
+ name = "%s/generated" % name ,
25
22
srcs = [src ],
26
- outs = [src + ".cc" ],
23
+ outs = [
24
+ src + ".h" ,
25
+ src + ".cc" ,
26
+ ],
27
27
args = [
28
28
"$(location %s)" % src ,
29
29
"-o" ,
30
+ "$(location %s.h)" % src ,
31
+ "-o" ,
30
32
"$(location %s.cc)" % src ,
31
33
],
32
34
tool = "//:codegen" ,
33
35
)
34
36
35
37
cc_library (
36
38
name = name ,
37
- srcs = [":%s/source" % name ],
39
+ srcs = [src + ".cc" ],
38
40
deps = deps + [":%s/include" % name ],
39
41
)
40
42
41
43
cc_library (
42
44
name = "%s/include" % name ,
43
- hdrs = [":%s/header" % name ],
45
+ hdrs = [src + ".h" ],
44
46
include_prefix = include_prefix ,
45
47
strip_include_prefix = strip_include_prefix ,
46
48
)
You can’t perform that action at this time.
0 commit comments