Skip to content

Add BUILD files for printf and bsw libraries#494

Merged
christophruethingbmw merged 2 commits into
eclipse-openbsw:mainfrom
esrlabs:cr-864278
Jun 25, 2026
Merged

Add BUILD files for printf and bsw libraries#494
christophruethingbmw merged 2 commits into
eclipse-openbsw:mainfrom
esrlabs:cr-864278

Conversation

@SuhashiniNaik

@SuhashiniNaik SuhashiniNaik commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Add BUILD files for printf and bsw libraries

  • //libs/3rdparty/printf:printf
  • //libs/bsw/asyncConsole:async_console
  • //libs/bsw/cpp2can:cpp2can
  • //libs/bsw/cpp2ethernet:cpp2ethernet
  • //libs/bsw/lifecycle:lifecycle

Printf BUILD.bazel added to .riminfo

- //libs/3rdparty/printf:printf
- //libs/bsw/asyncConsole:async_console
- //libs/bsw/cpp2can:cpp2can
- //libs/bsw/cpp2ethernet:cpp2ethernet
- //libs/bsw/lifecycle:lifecycle
- Update bazel_migration/README.md

@christophruethingbmw christophruethingbmw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just a small comment.

hdrs = [
"src/printf/printf.h",
],
copts = [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does the copts interact with the options of depending libraries? Let's say we have a cc_library printf_user and it uses a deps = ["//libs/3rdparty/printf"], then all files within printf_user will be compiled with these additional flags, right? What in case we compile globally with a different -stc? Or with differend error flags?

Is there at all a reason that we need to put these extra warning flags and the std in the first place?

The -I is just there to allow the printf_config.h generated by the expand_template above to be in the include path, right? The strip_include_prefix does not help for it and includes would lead to system includes, right? Or do we even want this to be a system include?

@DominikAFischer DominikAFischer Jun 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does the copts interact with the options of depending libraries? Let's say we have a cc_library printf_user and it uses a deps = ["//libs/3rdparty/printf"], then all files within printf_user will be compiled with these additional flags, right? What in case we compile globally with a different -stc? Or with differend error flags?

The copts flags are not propagated to consumers t all and should only affect printf itself.

Is there at all a reason that we need to put these extra warning flags and the std in the first place?

These flags are applied like this also on the Cmake side:


The -I is just there to allow the printf_config.h generated by the expand_template above to be in the include path, right? The strip_include_prefix does not help for it and includes would lead to system includes, right? Or do we even want this to be a system include?

Correct: strip_include_prefix doesn't cover generated files.
includes would cause -iSystem, which might be fine but currently would be a deviation from the Cmake side

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, then let's leave it like this, but still something like -std might also affect the header files which we include somewhere. Since it is like this im CMake as well we can take it over and later adapt it on both sides.

@christophruethingbmw christophruethingbmw merged commit 5cb140d into eclipse-openbsw:main Jun 25, 2026
257 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants