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

build: place generated ld script into build directory #5043

Merged
merged 2 commits into from
Aug 20, 2018

Conversation

igrr
Copy link
Member

@igrr igrr commented Aug 14, 2018

arduino-builder 1.3.25 (shipped with Arduino 1.8.5) forces full
recompilation when any file in the core directory is modified. Avoid
full recompilation by placing generated ld script into build
directory, not source directory.

Also fix an issue where git version description would not be generated
if there were spaces in build path.

Closes #5008.

arduino-builder 1.3.25 (shipped with Arduino 1.8.5) forces full
recompilation when any file in the core directory is modified. Avoid
full recompilation by placing generated ld script into build
directory, not source directory.

Also fix an issue where git version description would not be generated
if there were spaces in build path.
@igrr igrr requested a review from devyte August 14, 2018 09:24
@igrr
Copy link
Member Author

igrr commented Aug 14, 2018

With these changes the following happens on each rebuild:

For git version only:

  • core-version.h is generated
  • Esp-version.cpp is compiled
  • core_esp8266_main.cpp is compiled
  • core object files are archived

For git version and for boards manager package:

  • LD script is generated
  • elf file is linked
  • output file is generated

Which still leaves some room for improvement, but is much faster than "recompiling all".

To fix recompilation due to LD script generation, we can probably ship a small tool which will "copy file if contents have changed", i.e. compare src and dst, and copy src to dst if they have different content.

@d-a-v
Copy link
Collaborator

d-a-v commented Aug 16, 2018

To fix recompilation due to LD script generation, we can probably ship a small tool which will "copy file if contents have changed", i.e. compare src and dst, and copy src to dst if they have different content.

Without asking user to install something more, we have gnu(linux) cp -u, windows xcopy /u and your portable linux/macos diff || cp.

.. or ask users to install the arduino.cc's "hourly build" 1.8.6 ?

@igrr
Copy link
Member Author

igrr commented Aug 16, 2018

diff || cp is a good idea, thanks.

1.8.6 does not fix recopilation on every build due to updated core_version.h. It's only an issue for git version though.

@igrr igrr merged commit 9f67d83 into master Aug 20, 2018
@igrr igrr deleted the bugfix/recompiling_all branch August 20, 2018 09:17
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.

IDE 1.8.5 recompiles every time after update to core 2.4.2
3 participants