Skip to content
Snippets Groups Projects
  1. Jan 25, 2022
  2. Jan 07, 2022
  3. Jan 06, 2022
    • Mitchell Hentges's avatar
      Bug 1725895: Add support for MSYS2 MozillaBuild r=glandium · 47520dab
      Mitchell Hentges authored
      MSYS2 has a slightly different directory structure (binaries are
      now under "/usr/bin/" instead of "/bin/"), and we're now plonking
      it in `%MOZILLABUILD%\msys2` instead of `%MOZILLABUILD%\msys` so that
      MSYS1 files don't interfere with MSYS2 after a pave-over install.
      
      Speaking of pave-over installs: if both `msys2` and `msys` are available,
      this patch prefers `msys2`. This is because MozillaBuild installations
      with MSYS2 are going to _assume_ they're using MSYS2, and therefore
      be most compatible with the versions of packages shipped with MSYS2.
      
      Differential Revision: https://phabricator.services.mozilla.com/D133549
      47520dab
    • Mitchell Hentges's avatar
      Bug 1740123: Allow invoking Mach outside of MozillaBuild r=glandium · 92a19e0e
      Mitchell Hentges authored
      Assuming that the `MOZILLABUILD` environment variable is set, allow
      invoking Mach from non-MozillaBuild terminals.
      
      Note that MozillaBuild still needs to be installed, and the
      `MOZILLABUILD` environment variable will have to be set.
      
      For future reference: when I tried setting this up with Windows
      Store's Python 3.9, I encountered issues when running binaries installed
      via `pip`: it would fail with `abort: failed to load Python DLL
      python3x.dll`.
      
      Differential Revision: https://phabricator.services.mozilla.com/D133936
      92a19e0e
    • Mitchell Hentges's avatar
      Bug 1725895: Port `--profile-command` to pure-Python r=nalexander,glandium · 7e6a4952
      Mitchell Hentges authored
      As part of this, the shell-script part of `./mach` can be removed,
      making it pure Python.
      
      There's a change in `--profile-command` behaviour, though: it now only
      profiles the specific command, rather than all of Mach.
      This is because _so much of Mach_ has already been run before
      CLI arguments are parsed in the Python process.
      
      If a developer wants to profile Mach itself, they can manually run
      `python3 -m cProfile -o <file> ./mach ...`
      
      Differential Revision: https://phabricator.services.mozilla.com/D133928
      7e6a4952
  4. Jan 05, 2022
  5. Jan 04, 2022
  6. Jan 03, 2022
  7. Dec 31, 2021
    • Mike Hommey's avatar
      Bug 1747533 - Update clang pass manager flags handling. r=firefox-build-system-reviewers,andi · d179837c
      Mike Hommey authored
      - Avoid the flag selection silently not enabling the new pass manager
        when --enable-new-pass-manager is passed explicitly.
      - Avoid adding the -fexperimental-new-pass-manager to clang >= 13, which
        has it enabled by default. Likewise for the linker flags.
      - Remove the force-enable of the new pass manager with clang < 12 on
        automation, since we're using version 13 anyways.
      - Account for the fact that both lld and ld64 can pass the
        -import-hot-multiplier flag to the LTO plugin on mac builds, which
        effectively will set it for the first time on mac, and might improve
        performance.
      
      Differential Revision: https://phabricator.services.mozilla.com/D134860
      d179837c
  8. Dec 30, 2021
    • Mitchell Hentges's avatar
      Bug 1732946: Guard against "pip install" venv conflicts r=ahal · 8f5aad46
      Mitchell Hentges authored
      `pip install`'s standard behaviour is to satisfy the new requirement,
      even if it conflicts with existing packages. If a conflict _does_
      occur, `pip` will simply warn about it after the installation has
      already damaged the environment.
      
      By using the `--constraint` feature, we force `pip` to consider
      already-installed packages before installing new ones. If a conflict
      is detected, an error is raised and `pip` stops without damaging
      the environment.
      
      Since we're capturing system packages (when needed) with this feature,
      we can now allow virtualenvs that do pip-installations to safely work
      with system-using Mach environments.
      
      Differential Revision: https://phabricator.services.mozilla.com/D126925
      8f5aad46
    • Mitchell Hentges's avatar
      Bug 1730712: Avoid redundant venv rebuilds in nested Mach calls... · e045b404
      Mitchell Hentges authored
      Bug 1730712: Avoid redundant venv rebuilds in nested Mach calls r=perftest-reviewers,ahal,AlexandruIonescu
      
      Port some `sys.path` modifications to the centralized system.
      Not only is this cleaner (ad-hoc global modifications are spicy), but
      this also avoids "reordering" issues that can creep in during nested
      calls, causing virtualenvs to be unnecessarily recreated.
      
      Differential Revision: https://phabricator.services.mozilla.com/D134481
      e045b404
  9. Dec 29, 2021
    • Mike Hommey's avatar
      Bug 1747757 - Remove -l from OS_LIBS set from gyp. r=firefox-build-system-reviewers,mhentges · a98b7b38
      Mike Hommey authored
      NSS gyp files use -l$lib, and while OS_LIBS accepts this form and passes
      it through, it's not actually a recognized way to link libraries on
      clang-cl builds. So, re-normalize the values to not include -l, which
      will add it back in the backend when appropriate, or switch to $lib.lib
      on platforms that use this form.
      
      Differential Revision: https://phabricator.services.mozilla.com/D134736
      a98b7b38
    • Mitchell Hentges's avatar
      Bug 1730712: Maintain sys.path consistency in nested Mach calls r=ahal · 37a1a70a
      Mitchell Hentges authored
      This patch resolves cases like the following:
      1. The system Python has `zstandard`.
      2. `MOZ_AUTOMATION=1 ./mach python --virtualenv psutil <script>`
         is run, adding `psutil` to the import scope.
      3. `<script>` runs Mach a _second_ time, and this time Mach needs to
         be able to import `zstandard` (in this case, it should be able
         to fetch it from the system Python's site-packages).
      
      The previous behaviour would add the "site-packages" of the //invoking//
      Python interpreter, but ancestor packages would get dropped.
      
      To rectify this issue, this patch changes "import inheritance" to keep
      more of the `sys.path`, rather than just
      `<external-python>.all_site_packages_dirs()`.
      
      Note: the original implementation of this patch passed forward *all*
      of the `sys.path` when creating virtualenvs. However, this caused issues
      when Mach ran `pip`, because `pip` was no longer able to discover the
      "standard library" (it was failing because it assumed all paths defined
      in a virtualenv's site were non-standard-library paths, and the original
      implementation broke that assumption).
      
      As part of this, a distinction was defined between the "current" Python
      interpreter (external_python) and the top-level Python interpreter
      (original_python). This was needed to enable discovering which paths
      are "standard library paths".
      
      Differential Revision: https://phabricator.services.mozilla.com/D134201
      37a1a70a
    • Kelsey Gilbert's avatar
      Bug 1747745 - Fix git worktree support in `./mach bootstrap`.... · 0b8af194
      Kelsey Gilbert authored
      Bug 1747745 - Fix git worktree support in `./mach bootstrap`. r=firefox-build-system-reviewers,mhentges
      
      Differential Revision: https://phabricator.services.mozilla.com/D134719
      0b8af194
  10. Dec 28, 2021
    • Aki Sasaki's avatar
      Bug 1747280 - nuke comm/ after cross-channel. r=mhentges,releng-reviewers,jmaher DONTBUILD · b480a06e
      Aki Sasaki authored
      We clean up our Gecko clone between tasks via `hg robustcheckout --purge`, which runs `hg purge`. This is very effective, *but* it doesn't detect or clean up any nested clones.
      
      Because we run cross-channel on Gecko workers, and because we clone `comm/` in cross-channel and haven't cleaned it up, and because `hg purge` doesn't detect or clean up nested clones, and because our current virtualenv setup code traverses the tree and can error out on `comm/` clones, let's clean up `comm/` after running cross-channel.
      
      We'll be moving TB cross-channel to different tasks/workers in bug 1742711, and ideally we can update robustcheckout and/or `hg purge` to be able to detect and/or clean up nested clones.
      
      Differential Revision: https://phabricator.services.mozilla.com/D134582
      b480a06e
  11. Dec 24, 2021
  12. Dec 23, 2021
Loading