-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add justifications for missing PICO_BAZEL_CONFIG and PICO_CMAKE_CONFIG entries
#2875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,8 +68,18 @@ | |
| "PICO_TOOLCHAIN_PATH", | ||
| # Bazel uses native --platforms mechanics. | ||
| "PICO_PLATFORM", | ||
| "PICO_DEFAULT_PLATFORM", | ||
| "PICO_DEFAULT_RP2350_PLATFORM", | ||
| # Named PICO_TOOLCHAIN in Bazel. | ||
| "PICO_COMPILER", | ||
| # Bazel uses PICO_COMPILATION_NO_OPT_ARGS and PICO_COMPILATION_NO_DEBUG_ARGS | ||
| # to allow overriding these flags instead. | ||
| "PICO_DEOPTIMIZED_DEBUG", | ||
| "PICO_DEBUG_INFO_IN_RELEASE", | ||
| # Entirely irrelevant to Bazel, use Bazel toolchains: | ||
| # https://bazel.build/extending/toolchains | ||
| "PICO_TOOLCHAIN_DIR", | ||
| "PICO_GCC_TRIPLE", | ||
| # Entirely irrelevant to Bazel, use Bazel platforms: | ||
| # https://bazel.build/extending/platforms | ||
| "PICO_CMAKE_PRELOAD_PLATFORM_FILE", | ||
|
|
@@ -81,22 +91,44 @@ | |
| "PICO_CONFIG_HEADER_FILES", | ||
| "PICO_RP2040_CONFIG_HEADER_FILES", | ||
| "PICO_HOST_CONFIG_HEADER_FILES", | ||
| "PICO_RP2350_ARM_S_CONFIG_HEADER_FILES", | ||
| "PICO_RP2350_RISCV_CONFIG_HEADER_FILES", | ||
| # Bazel uses PICO_CONFIG_HEADER. | ||
| "PICO_BOARD_CMAKE_DIRS", | ||
| "PICO_BOARD_HEADER_FILE", | ||
| "PICO_BOARD_HEADER_DIRS", | ||
| # Bazel handles default boards differently. | ||
| "PICO_DEFAULT_BOARD_rp2040", | ||
| "PICO_DEFAULT_BOARD_rp2350", | ||
| "PICO_DEFAULT_BOARD_host", | ||
| # Bazel doesn't provide a way of overriding the defaults for this. | ||
| # TODO: Provide a way to customise these toolchain flags. | ||
| "PICO_HARD_FLOAT_ABI", | ||
| "PICO_NO_CMSE", | ||
| # Bazel supports this differently. | ||
| # TODO: Provide a helper rule for explicitly generating a UF2 so users don't | ||
| # have to write out a bespoke run_binary. | ||
| "PICO_NO_UF2", | ||
| "PICO_NO_COPRO_DIS", | ||
| "PICO_ALLOW_EXAMPLE_KEYS", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should there be an explicit TODO: to add a similar option to Bazel? |
||
| # Bazel will not provide a default for this. | ||
| # TODO: Provide handy rules for PIOASM so users don't have to write out a | ||
| # bespoke run_binary. | ||
| "PICO_DEFAULT_PIOASM_OUTPUT_FORMAT", | ||
| # Bazel always has picotool. | ||
| "PICO_NO_PICOTOOL", | ||
| # These aren't supported as build flags in Bazel. Prefer to | ||
| # set these in board header files like other SDK defines. | ||
| # Bazel includes these differently. | ||
| "PICO_TINYUSB_PATH", | ||
| "PICO_BTSTACK_PATH", | ||
| "PICO_CYW43_DRIVER_PATH", | ||
| "PICO_MBEDTLS_PATH", | ||
| "PICO_LWIP_PATH", | ||
| # These are legacy CMake options that should not be used. | ||
| "PICO_NO_FLASH", | ||
| "PICO_COPY_TO_RAM", | ||
| # These aren't supported as build flags in CMake either, but they appear | ||
| # as comments which this script can't tell. | ||
|
Comment on lines
+129
to
+130
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alternatively, it looks like this simple tweak allows this script to ignore "commented out" --- a/tools/compare_build_systems.py
+++ b/tools/compare_build_systems.py
@@ -187,6 +187,9 @@ def FindKnownOptions(option_pattern_matcher, file_paths):
for p in file_paths:
with open(p, "r") as f:
for line in f:
+ if re.match("\s*#\s*#", line):
+ continue
+
match = re.search(pattern, line)
if not match:
continue |
||
| "CYW43_PIN_WL_DYNAMIC", | ||
| "CYW43_DEFAULT_PIN_WL_REG_ON", | ||
| "CYW43_DEFAULT_PIN_WL_DATA_OUT", | ||
| "CYW43_DEFAULT_PIN_WL_DATA_IN", | ||
|
|
@@ -105,6 +137,7 @@ | |
| "CYW43_DEFAULT_PIN_WL_CS", | ||
| "CYW43_PIO_CLOCK_DIV_INT", | ||
| "CYW43_PIO_CLOCK_DIV_FRAC", | ||
| "CYW43_PIO_CLOCK_DIV_FRAC8", | ||
| "CYW43_PIO_CLOCK_DIV_DYNAMIC", | ||
| ) | ||
|
|
||
|
|
@@ -133,6 +166,7 @@ | |
| # - PICO_BOARD_HEADER_DIRS | ||
| "PICO_CONFIG_HEADER", | ||
| # Bazel configuration for 3p deps. | ||
| "PICO_TINYUSB_CONFIG", | ||
| "PICO_BTSTACK_CONFIG", | ||
| "PICO_LWIP_CONFIG", | ||
| "PICO_MBEDTLS_CONFIG", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be pretty easy. I'll take a look.