On Wed, Jul 23, 2014 at 02:59:00PM +0900, Mike Hommey wrote: > Hi, > > I just landed bug 1036894 and related bugs on mozilla-inbound. The short > story is that things should now be less cumbersome. > > For most cases in the tree, where you want to add something to libxul, > things are mostly unchanged: just add > > FINAL_LIBRARY = 'xul' > or > FINAL_LIBRARY = 'gkmedias' > > as appropriate. You don't need a LIBRARY_NAME in this case. Note that > as of bugs 1041860 and 1041864, we don't have the useless intermediate > libraries like gklayout or necko, etc. which at this point were only > left because that's how things have been for 10+ years. No more > wondering what specific FINAL_LIBRARY you need to use (as someone asked > me recently on irc). > > For other cases, where you want to link a shared library or an > executable, things have improved, although they are work-in-progress. > If you have had to do that in the past, you may have wondered if you > needed to use SHARED_LIBRARY_LIBS, EXTRA_DSO_LDOPTS, EXTRA_LIBS, LIB, or > whatever else. > > With bug 1036894, for in-tree moz.build-managed libraries, there's only > USE_LIBS to define in moz.build. Other libraries, for now, still need > to be defined in EXTRA_LIBS or OS_LIBS, with the semantics defined in > https://hg.mozilla.org/integration/mozilla-inbound/rev/a0988e587a90 > > USE_LIBS takes a list of LIBRARY_NAMEs as defined in other moz.build > files, possibly prefixed with a path if there are ambiguities. The build > system will figure things out from there.
I now realize I left an interesting detail out of the picture: before, you needed to go through hoops if you needed to link against libxul because it's built near the end, and things that link against it obviously need to be built after, so there were tier tricks, or tools_dir tricks. Forget about all those. The build system now figures out the right order based on the moz.build linkage definitions. I'm sure it's possible to find corner cases where that blows up, but for most scenarios, it just works. Cheers, Mike _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform