{"id":217,"date":"2013-08-15T11:12:19","date_gmt":"2013-08-15T15:12:19","guid":{"rendered":"http:\/\/blog.mozilla.org\/nfroyd\/?p=217"},"modified":"2013-08-15T11:12:19","modified_gmt":"2013-08-15T15:12:19","slug":"better-build-times-through-configury","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/nfroyd\/2013\/08\/15\/better-build-times-through-configury\/","title":{"rendered":"better build times through configury"},"content":{"rendered":"<p>There&#8217;s been a flurry of activity lately on making Firefox build faster.\u00a0 One thing that&#8217;s not talked about much is tailoring what features how build or how you build can make things go faster.\u00a0 Below are a couple configure options that may make your life better, depending on what platform you develop for and what your focus is.\u00a0 None of these are going to help as much as <a href=\"http:\/\/glandium.org\/blog\/?p=3001\">glandium&#8217;s xulrunner SDK development trickery<\/a>, but for those who can&#8217;t do that, for whatever reason, these may be helpful.\u00a0 Add them to your mozconfig with <tt>ac_add_option<\/tt> or your manual <tt>configure<\/tt> invocation if you are oldschool.<\/p>\n<ul>\n<li><tt>--disable-debug-symbols<\/tt>: This option isn&#8217;t appropriate if you plan on doing <em>any <\/em>C\/C++ debugging. Really. But if you work more-or-less exclusively in JavaScript (or Java, for Android), this option can make your builds go much faster by making your object files smaller and link times faster. My local Android builds shave 30 minutes of total runtime (!) by enabling this. The actual win is somewhere on the order of 3 minutes due to the wonders of parallel make. Still, 15% improvements are nothing to sneeze at.<\/li>\n<li><tt>--disable-crashreporter<\/tt>: This configure option builds less code, which is always a good thing.\u00a0 Needing the crashreporter would be pretty unusual for local development, so this is probably pretty safe.<\/li>\n<li><tt>--disable-webrtc<\/tt>: Again, ths option is for not building a (somewhat larger) swath of code.\u00a0 May not be appropriate if you&#8217;re doing Web Audio or trying to measure startup improvements.<\/li>\n<li><tt>--disable-icf<\/tt>: This option is only useful if you&#8217;re building on Linux and you know you&#8217;re using the gold linker.\u00a0 This option turns off merging of identical functions, which makes the linker run slightly faster.\u00a0 (May also work on Windows with opt builds, not sure.)<\/li>\n<\/ul>\n<p>For development on Linux with GCC specifically, there are a few compiler options that may make your life better also:<\/p>\n<ul>\n<li><tt>-fno-var-tracking<\/tt>: This option makes the debug information for C\/C++ slightly less accurate.\u00a0 Variable tracking is a relatively new thing (GCC 4.6+) and tends to suck up quite a bit of compile time.\u00a0 If you were debugging happily with GCC 4.5 and earlier, you may not notice any problems with turning variable tracking off.<\/li>\n<li><tt>-gsplit-dwarf<\/tt>: What this does is it separates debug information into a completely different file from the actual compiled code.\u00a0 This change, in turn, makes the object files smaller, primarily for the benefit of the linker.\u00a0 You can <a href=\"http:\/\/gcc.gnu.org\/wiki\/DebugFission\">read more about the motivation for splitting debug information<\/a> into separate files on the GCC Wiki.\u00a0 There&#8217;s also <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=905646\">a bug about adding this by default to local developer builds<\/a>.\u00a0 (Recent SVN builds of clang also support this option, I think.)<\/li>\n<\/ul>\n<p>Finally, if you want to dive really deep, you can <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=901384\">play around with the options passed to the gold linker<\/a> on Linux.\u00a0 (And if you do, please post some numbers to that bug; we&#8217;d love to get more data on how those options work for people!)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There&#8217;s been a flurry of activity lately on making Firefox build faster.\u00a0 One thing that&#8217;s not talked about much is tailoring what features how build or how you build can make things go faster.\u00a0 Below are a couple configure options that may make your life better, depending on what platform you develop for and what [&hellip;]<\/p>\n","protected":false},"author":320,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/posts\/217"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/users\/320"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/comments?post=217"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/posts\/217\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/media?parent=217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/categories?post=217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/tags?post=217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}