mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 02:40:22 -10:00
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`. Differential Revision: https://phabricator.services.mozilla.com/D43157
This directory contains common Python code. The basic rule is that if Python code is cross-module (that's "module" in the Mozilla meaning - as in "module ownership") and is MPL-compatible, it should go here. What should not go here: * Vendored python modules (use third_party/python instead) * Python that is not MPL-compatible (see other-licenses/) * Python that has good reason to remain close to its "owning" (Mozilla) module (e.g. it is only being consumed from there). Historical information can be found at https://bugzilla.mozilla.org/show_bug.cgi?id=775243 https://bugzilla.mozilla.org/show_bug.cgi?id=1346025