Ever since bug 969164, the js build system, when building gecko (not when
building standalone) uses a autoconf-js.mk file for its config.
One of the suboptimal ways we have to retrigger builds when the build
configuration changes (changes to e.g. configure.in can do that) is to
make most things depend on autoconf.mk. Which unfortunately doesn't
account for the fact the js/src subdirectory uses a different file.
In practice, this means that some classes of changes to the js build
system, not accompanied with toplevel build system changes may no
trigger the corresponding rebuilds in the js subtree on incremental
builds.
DLLFLAGS was exported from main configure so that it would be picked by NSPR
configure, allowing to pass down flags to link NSPR against mozglue. With
MOZ_FOLD_LIBS always enabled on MSVC builds, that is not necessary anymore
since the NSPR build system doesn't build any shared library anymore.
Setting MOZ_FOLD_LIBS should stop being an opt-in for individual applications,
which also makes them responsible for doing the right thing, which happens not
to be the case for B2G Desktop Linux builds.
Enforcing MOZ_FOLD_LIBS to be set on the relevant platforms in configure ensures
everything is setup up correctly, and also allows to stop caring about supporting
now hypothetical e.g. MSVC builds without MOZ_FOLD_LIBS (which require to pass
DLLFLAGS down to the nspr build system to make nspr built against mozglue which
would now be unnecessary)
Currently, when there is both an expandlibs descriptor and an actual static
library, expandlibs picks the static library. This has the side effect that
if there are object files in the static library that aren't directly used,
they're dropped when linking, even when they export symbols that would be
exported in the final linked binary.
In most cases in the code base, files are not dropped that way. The most
notable counter-example is xpcomglue, where actually not dropping files
leads to link failure because of missing symbols those files reference
(yes, that would tend to say the glue is broken in some way).
On the opposite side, there is mozglue, which does have both a descriptor
and a static library (the latter being necessary for the SDK), and that
linking as a static library drops files that shouldn't be dropped (like
jemalloc). We're currently relying on -Wl,--whole-archive for those files
not to be dropped, but that won't really be possible without much hassle
in a world where mozglue dependencies live in moz.build land.
Switching expandlibs to use descriptors when they exist, even when there
is a static library (so, the opposite of the current behavior) allows to
drop -Wl,--whole-archive and prepare for a better future. However, as
mentioned, xpcomglue does still require to be linked through the static
library, so we need to make it a static library only.
To achieve that, we make NO_EXPAND_LIBS now actually mean no expandlibs
and use that to build the various different xpcomglues.
This patch fixes a few nits and typos in the C++ spellchecking code as well as
fixing the Finnish dictionary and multiple installed dictionaries in general (r=ehsan).
It reworks the spellchecking context menu to use async message passing (in JS)
and reduces, by a little, the CPOW use in the context menu code (r=felipe).
Finally, the spellcheck IPDL no longer needs to be 'rpc' since we no longer
nest spellchecking calls, so it can go back to being 'sync' (r=billm).