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

Config improvements for working on C / C++ #756

Merged
merged 4 commits into from May 13, 2020
Merged

Config improvements for working on C / C++ #756

merged 4 commits into from May 13, 2020

Conversation

RReverser
Copy link
Contributor

@RReverser RReverser commented May 12, 2020

Various config improvements for easier continuous work on C / C++:

  • Autoformatted C / C++ with clang-format for consistent [Chromium] style.
  • Removed unnecessary -x c++ from build scripts.
  • Improved rebuild speed by caching the safe bits:
    • Removed -f from autoreconf to reuse generated configure scripts.
    • Added -C to ./configure to reuse stored information about emcc.
    • Removed rm -rf build from WebP encoder/decoder.
    • Stored Emscripten cache inside node_modules/.em_cache. Docker image ships without LTO libs, so Emscripten had to rebuild stdlibs on every build otherwise.
  • Merged webp_enc + webp_dec build scripts. Core libwebp library is same in both cases, so there's no point in storing and building two copies of it.

 - Remove unnecessary `-x c++`.
 - Improve rebuild speed by caching:
   - Remove `-f` from `autoreconf` to reuse generated configure scripts.
   - Remove `--rm` from `docker run` to avoid rebuilding Emscripten stdlib.
   - Add `-C` to `./configure` to reuse stored information about `emcc`.
   - Remove `rm -rf build` from WebP encoder/decoder.
 - Store Emscripten cache inside node_modules/.em_cache. Docker image ships without LTO libs, so Emscripten has to rebuild stdlibs on every build otherwise.
 - Merge webp_enc + webp_dec build scripts. Core libwebp library is same in both cases, so there's no point in storing and building two copies of it.
@surma surma closed this May 13, 2020
@surma surma reopened this May 13, 2020
@surma
Copy link
Collaborator

surma commented May 13, 2020

Haven’t taken a look at the details, but I’m not sure about removing --rm from Docker as it will create a new docker VM every time the command runs.

@RReverser
Copy link
Contributor Author

Yeah I suppose you're right; I thought it would help me preserve Emscripten cache, but in the end had to move it to a mounted folder anyway. I'll restore that one.

@RReverser
Copy link
Contributor Author

Updated, please take another look.

@RReverser RReverser merged commit 1ae93b5 into master May 13, 2020
@RReverser RReverser deleted the cpp-config branch May 13, 2020 18:40
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.

None yet

2 participants