Skip to content

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

Closed

Description

@nomis

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.

Activity

  1. changed the title [-]Platform components are build with the project source build flags[/-] [+]Platform components are built with the project source build flags[/+] on May 18, 2022
  2. mcspr commented on May 19, 2022

    @mcspr
    Contributor

    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

  3. added this to the 6.0.2 milestone on May 19, 2022
  4. nomis commented on May 19, 2022

    @nomis
    ContributorAuthor

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

  5. ivankravets commented on May 19, 2022

    @ivankravets
    Member

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

    pio upgrade --dev
    
  6. nomis commented on May 19, 2022

    @nomis
    ContributorAuthor

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

    Yes

  7. ivankravets commented on May 26, 2022

    @ivankravets
    Member

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

  8. added a commit that references this issue on Sep 24, 2024
    06ed9ba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions