Hi,

I am going to land a long series of patches that changes how Gecko code
linkage is defined.

Currently, when you add new code (like, a new module) to Gecko, you:
- Add a new directory
- Edit the parent moz.build to add the directory
- Add your source files
- Add a new moz.build defining at least:
  - SOURCES
  - LIBRARY_NAME
  - LIBXUL_LIBRARY
  - MODULE
- Edit toolkit/library/Makefile.in, layout/build/Makefile.in, or
  layout/media/Makefile.in to add your "library" to either libxul,
  libgklayout or libgkmedias, with the right ifdefs.
- Edit toolkit/library/nsStaticXULComponents.cpp to add your module,
  with the right #ifdefs. (if it's a xpcom module you're adding)

I think that's all. That's already a lot.

With the upcoming landing, this becomes:
- Add a new directory
- Edit the parent moz.build to add the directory
- Add your source files
- Add a new moz.build defining at least:
  - SOURCES
  - FINAL_LIBRARY
- done.

There are two bits of magic involved here:
- FINAL_LIBRARY defines what library your code is going to be linked
  into. That needs to match an existing LIBRARY_NAME in some other
  moz.build. Most code will go in either xul, gkmedias or gklayout. Note
  gklayout may go away in the future, because it's just an
  implementation detail and an heritage of the past, but there are some
  ordering issues involved with removing it so we're keeping it for the
  moment. There are other remaining values of LIBRARY_NAME, they will
  fade away in the future, and shouldn't matter for most people.
- The xpcom module list is going to be built with some linker magic. The
  error-prone list in nsStaticXULComponents.cpp is no longer required.

Enjoy,

Mike
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to