emscripten-core / emsdk

Emscripten SDK
http://emscripten.org
Other
2.96k stars 676 forks source link

Is there a recommended way of causing system libraries to be rebuilt? #1267

Closed lippinj closed 1 year ago

lippinj commented 1 year ago

I would like to try out some not-yet-released changes to emscripten locally (specifically, this commit).

I can see that the source files I need to modify are located at upstream/emscripten/system/lib. What is the right way to incorporate my modifications into my builds? Changing the files by itself is not sufficient, but if I additionally delete the upstream/emscripten/cache directory, a rebuild occurs. But this seems a bit hacky. Is there a better way?

sbc100 commented 1 year ago

Yes we have a command called embuilder that can take care of this for you.

You can re-build individual libraries a command line embuilder build libc, or you clear the whole cache with emcc --clear-cache which will cause all libraries to be rebuilt the next time the linker needs them.

lippinj commented 1 year ago

This is the sort of thing I was expecting, thanks!

It does take a bit of delving to find which source file belongs to which target, though 😅