mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 19:25:43 +00:00
f9be0e1c7f
The `freestanding` library is built with specific compiler flags to signify that it is indeed freestanding code. That is, it does not depend on a standard library. One of the requirements of freestanding code is that the toolchain still expects implementations of `memcpy`, `memmove`, `memcmp`, and `memset`. I did briefly implement my own naive versions of these functions, but that solution is less than ideal since the implementations must be `extern` and are thus picked up by the entire `firefox.exe` binary. This denies the rest of `firefox.exe` the benefit of optimized implementations. On Windows, the sandbox is linked into `firefox.exe`, so we cannot just shrug and assume that naive implementations will not have any effect on anything. There are, however, optimized implementations of these functions that are exported by `ntdll.dll`. They are not included in the `ntdll.lib` that is included in the Windows SDK. Using `llvm-dlltool`, we can build an import library containing the missing entries and then add that library to `OS_LIBS`. Depends on D43156 Differential Revision: https://phabricator.services.mozilla.com/D43157 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
dumbmake | ||
mozbuild | ||
mozpack | ||
setup.py | ||
TODO |