Skip to content
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

Platform components are built with the project source build flags #4277

Closed
nomis opened this issue May 18, 2022 · 5 comments
Closed

Platform components are built with the project source build flags #4277

nomis opened this issue May 18, 2022 · 5 comments
Labels
bug build system ldf Library Dependency Finder
Milestone

Comments

@nomis
Copy link
Contributor

nomis commented May 18, 2022

Configuration

Operating system:

PlatformIO Version (platformio --version): 6.0.1

Description of problem

PlatformIO is building platform components with the project source build flags.

Steps to Reproduce

  1. git clone https://github.com/nomis/scd30 -b test
  2. platformio run -e s2_mini -v

There are defines included in every build_flags and src_build_flags used by this environment to illustrate the problem.

Actual Results

Platform component LittleFS.cpp is compiled with build_flags and src_build_flags flags.

23:56:52.829  xtensa-esp32s2-elf-g++ -o .pio/build/s2_mini/lib8c1/LittleFS/LittleFS.cpp.o -c ... \
  -DPIO_COMMON_BUILD_FLAGS -DPIO_S2_MINI_BUILD_FLAGS \
  -DPIO_COMMON_SRC_BUILD_FLAGS -DPIO_S2_MINI_SRC_BUILD_FLAGS \
  ...

Expected Results

Platform component LittleFS.cpp is compiled with only build_flags flags.

Additional info

The project source build flags include -Wall -Wextra -Werror which causes the build to fail because the platform components have errors in them.

This works correctly with version 5.2.5.

@nomis nomis changed the title Platform components are build with the project source build flags Platform components are built with the project source build flags May 18, 2022
@mcspr
Copy link
Contributor

mcspr commented May 19, 2022

seems to have broken because of #4253 / c4388a6
https://github.com/mcspr/pio-scan-deps test from the issue might break instead if reverted, though

@ivankravets ivankravets added this to the 6.0.2 milestone May 19, 2022
@nomis
Copy link
Contributor Author

nomis commented May 19, 2022

@ivankravets You've left debug print statements in the commit.

@ivankravets
Copy link
Member

Thanks! Fixed. Does the latest build work for you?

pio upgrade --dev

@nomis
Copy link
Contributor Author

nomis commented May 19, 2022

Thanks! Fixed. Does the latest build work for you?

Yes

@ivankravets
Copy link
Member

@richcj10 please forward your question to https://community.platformio.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug build system ldf Library Dependency Finder
Projects
None yet
Development

No branches or pull requests

3 participants