Skip to content
Snippets Groups Projects
  1. Aug 06, 2016
    • Nathan Froyd's avatar
      Bug 1231764 - part 6 - build rust code via cargo; r=chmanchester · f7fb6722
      Nathan Froyd authored
      This patch is really two separate changes.
      
      The first change is that rust crates are large, standalone entities that
      may contain multitudes of source files.  It therefore doesn't make sense
      to keep them in SOURCES, as we have been doing.  Moving to use cargo
      will require a higher-level approach, which suggests that we need a
      different, higher-level representation for Rust sources in the build
      system.
      
      The representation here is to have the build system refer to things
      defined in Cargo.toml files as the entities dealt with in the build
      system, and let Cargo deal with the details of actually building things.
      This approach means that adding a new crate to an existing library just
      requires editing Rust and Cargo.toml files, rather than dealing with
      moz.build, which seems more natural to Rust programmers.  By having the
      source files for libraries (and binaries in subsequent iterations of
      this support) checked in to the tree, we can also take advantage of
      Cargo.lock files.
      
      The second is that we switch the core build system over to building via
      cargo, rather than invoking rustc directly.
      
      We also clean up a number of leftover things from the Old Way of doing
      things.  A number of tests are added to confirm that we'll only permit
      crates to be built that have dependencies in-tree.
      f7fb6722
    • Nathan Froyd's avatar
      Bug 1231764 - part 5 - add a Cargo.toml for the dom/media/gtest/ code; r=chmanchester · dec8ad67
      Nathan Froyd authored
      We are going to need a Cargo.toml for all Rust code in the tree, no
      matter how trivial.
      dec8ad67
    • Nathan Froyd's avatar
      Bug 1231764 - part 4 - add pytoml to the virtualenv; r=chmanchester · ef91835e
      Nathan Froyd authored
      We need to parse Cargo.toml files from moz.build to determine crate
      package names.
      ef91835e
    • Nathan Froyd's avatar
      Bug 1231764 - part 3 - rename RustRlibLibrary to RustCrate; r=chmanchester · eb1514a4
      Nathan Froyd authored
      rlibs are going to be less important once we start building with cargo:
      the focus will move to crates instead, so that's what we should call the
      moz.build object.
      eb1514a4
    • Nathan Froyd's avatar
    • Nathan Froyd's avatar
      Bug 1231764 - part 1 - search for cargo when --enable-rust; r=chmanchester · 8e363d81
      Nathan Froyd authored
      We've going to use it, the location of it should be configurable.
      8e363d81
    • Nathan Froyd's avatar
      Bug 1231764 - part 0 - only link librul once; r=chmanchester · 4fb1a754
      Nathan Froyd authored
      Through an oversight, we listed librul.a twice when linking libxul: once
      as part of the "objects" we were linking, and once as a static library.
      This duplication is unnecessary and would cause problems later when we
      try to generate librul.a via cargo, as cargo will put it someplace
      different from where we expect and the two names will conflict.  Let's
      have rules.mk be the single source of truth for how librul.a is named,
      and then the code to link libxul can simply refer to that name.
      4fb1a754
  2. Aug 05, 2016
  3. Aug 06, 2016
    • Nathan Froyd's avatar
      Bug 1292301 - reduce reference-counting in Places; r=adw · a5dd4da9
      Nathan Froyd authored
      By using nsCOMArray::Forget, we can pass the references we hold in an
      nsCOMArray directly to the XPCOM caller, without having to go through an
      extra cycle of AddRef/Release calls.  This way should be slightly faster
      and it also results in smaller code.  Notice that we don't have to worry
      about removing the OOM check in the places that use Forget(), because we
      were already using moz_xmalloc to allocate the outparam array, and
      moz_xmalloc aborts the process on OOM, just as Forget() does.
      
      The nsNavHistoryFolderResultNode::GetQueries change is thrown in for fun.
      a5dd4da9
  4. Aug 05, 2016
  5. Jul 21, 2016
  6. Aug 05, 2016
Loading