Skip to content

Code no longer compiles when using --build-property "compiler.cpp.extra_flags=-DPRINT_DEPENDENCIES"  #2683

Closed as not planned
@tyeth

Description

@tyeth

Describe the problem

As advised in the help page for compile (rubbish docs as there are just 3 examples and no links to available build properties or flag options)

To reproduce

Build Adafruit wippersnapper arduino firmware using arduino-cli and --verbose for the adafruit metro esp32s2 (works)

Do the same then with --verbose --build-property "compiler.cpp.extra_flags=-DPRINT_DEPENDENCIES" and you'll see the new define is included but the cpp flags file no longer is loaded with a -c argument beforehand (where the -DPrint_Deps appears).

Compile no longer works.
Adding the -c to the extra flags makes compile work again:
--build-property "compiler.cpp.extra_flags=-DPRINT_DEPENDENCIES -c"

Expected behavior

Adding an extra build flag using the --build-property build.extra_flags would not remove default flags (-DESP32 disappears), so I'm instead using compiler.cpp.extra_flags but that breaks the compile.

Arduino CLI version

1.0.3

Operating system

Windows

Operating system version

11

Additional context

ESP32 BSP 3.0.3

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

Labels

conclusion: invalidIssue/PR not validtopic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions