File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1
- load ("//bazel:defs.bzl" , "compatible_with_rp2" )
1
+ load ("//bazel:defs.bzl" , "compatible_with_rp2" , "pico_generate_pio_header" )
2
2
load ("//bazel/util:transition.bzl" , "kitchen_sink_test_binary" )
3
3
4
4
package (default_visibility = ["//visibility:public" ])
@@ -21,6 +21,11 @@ cc_library(
21
21
includes = ["." ],
22
22
)
23
23
24
+ pico_generate_pio_header (
25
+ name = "trivial_pio_test" ,
26
+ srcs = ["trivial.pio" ],
27
+ )
28
+
24
29
cc_library (
25
30
name = "kitchen_sink_common" ,
26
31
testonly = True ,
Original file line number Diff line number Diff line change
1
+ load ("@bazel_skylib//rules:expand_template.bzl" , "expand_template" )
2
+
1
3
package (default_visibility = ["//visibility:public" ])
2
4
3
5
# TODO: No support for building the parser.
@@ -19,6 +21,7 @@ cc_library(
19
21
"pio_disassembler.h" ,
20
22
"pio_enums.h" ,
21
23
"pio_types.h" ,
24
+ ":version" ,
22
25
],
23
26
copts = select ({
24
27
"@rules_cc//cc/compiler:msvc-cl" : ["/std:c++20" ],
@@ -63,6 +66,15 @@ cc_library(
63
66
alwayslink = True ,
64
67
)
65
68
69
+ expand_template (
70
+ name = "version" ,
71
+ template = "version.h.in" ,
72
+ substitutions = {
73
+ "${PIOASM_VERSION_STRING}" : module_version () if module_version () != None else "0.0.1-WORKSPACE" ,
74
+ },
75
+ out = "gen/version.h" ,
76
+ )
77
+
66
78
cc_binary (
67
79
name = "pioasm" ,
68
80
deps = [
You can’t perform that action at this time.
0 commit comments