mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2026-01-28 01:47:21 +01:00
Hook up pio version string in Bazel build
Some checks failed
Bazel presubmit checks / bazel-build-check (macos-latest) (push) Has been cancelled
Bazel presubmit checks / bazel-build-check (ubuntu-latest) (push) Has been cancelled
Bazel presubmit checks / other-bazel-checks (push) Has been cancelled
Check Configs / check-configs (push) Has been cancelled
CMake / build (push) Has been cancelled
Some checks failed
Bazel presubmit checks / bazel-build-check (macos-latest) (push) Has been cancelled
Bazel presubmit checks / bazel-build-check (ubuntu-latest) (push) Has been cancelled
Bazel presubmit checks / other-bazel-checks (push) Has been cancelled
Check Configs / check-configs (push) Has been cancelled
CMake / build (push) Has been cancelled
This commit is contained in:
parent
14896b6419
commit
485b34ac8d
2 changed files with 18 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
load("//bazel:defs.bzl", "compatible_with_rp2")
|
||||
load("//bazel:defs.bzl", "compatible_with_rp2", "pico_generate_pio_header")
|
||||
load("//bazel/util:transition.bzl", "kitchen_sink_test_binary")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
|
@ -21,6 +21,11 @@ cc_library(
|
|||
includes = ["."],
|
||||
)
|
||||
|
||||
pico_generate_pio_header(
|
||||
name = "trivial_pio_test",
|
||||
srcs = ["trivial.pio"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "kitchen_sink_common",
|
||||
testonly = True,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
# TODO: No support for building the parser.
|
||||
|
|
@ -19,6 +21,7 @@ cc_library(
|
|||
"pio_disassembler.h",
|
||||
"pio_enums.h",
|
||||
"pio_types.h",
|
||||
":version",
|
||||
],
|
||||
copts = select({
|
||||
"@rules_cc//cc/compiler:msvc-cl": ["/std:c++20"],
|
||||
|
|
@ -63,6 +66,15 @@ cc_library(
|
|||
alwayslink = True,
|
||||
)
|
||||
|
||||
expand_template(
|
||||
name = "version",
|
||||
template = "version.h.in",
|
||||
substitutions = {
|
||||
"${PIOASM_VERSION_STRING}": module_version() if module_version() != None else "0.0.1-WORKSPACE",
|
||||
},
|
||||
out = "gen/version.h",
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "pioasm",
|
||||
deps = [
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue