-
-
Notifications
You must be signed in to change notification settings - Fork 398
Compiling for different board variants in different build-dirs does not reuse already compiled objects #2266
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
Comments
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
Hi @n-peugnet, thanks for the bug report, I've examined the situation and I can confirm the bug. It seems that the problem is that
As you can see, at each compile round, a new level is added to the build path (that in turn will be copied on the next compile recursively). This has two side effects:
I'm going to prepare a patch to fix these problems. Luckily, this bug does not affect the compilation result, it is still correct because the deeper |
Great find ! I didn't see it but it's there:
And I can confirm it works as expected on latest master. Thank you! |
Describe the problem
I am trying to build the same sketch for different variants of the nano33ble board. For the sense Rev2 board I added this flag
--build-property 'compiler.cpp.extra_flags=-DSENSE_REV2'
to include some additional parts of the code. When alternating between two builds (with and without this extra flag) the compilation is very long as all the libraries are recompiled each time. So I tried to set a build dir with--build-cache-path
and--build-path
options for each configuration, so that the already compiled files can be reused. But it continues to recompile everything each time I switch from one command to another. Am I doing something wrong?To reproduce
Here are the two compile commands I am using:
And here is a console log:
arduino-cli-compile.log
Expected behavior
When using different
--build-path
and--build-cache-path
, multiple variant of the same sketch for the same board should be able to be built without recompiling everything when switching from one to another.Arduino CLI version
arduino-cli Version: nightly-20230817 Commit: 459fe76 Date: 2023-08-17T01:23:47Z
Operating system
Linux
Operating system version
Linux SMP PREEMPT_DYNAMIC Debian 6.4.4-2 (2023-07-30) x86_64
Additional context
No response
Issue checklist
The text was updated successfully, but these errors were encountered: