Commit 69ace4b4 authored by Daniel Varga's avatar Daniel Varga
Browse files

Backed out 3 changesets (bug 1525069) for linting failure at...

Backed out 3 changesets (bug 1525069) for linting failure at /builds/worker/checkouts/gecko/python/mozboot/mozboot/mozillabuild.p on a CLOSED TREE

Backed out changeset 1a41624ff365 (bug 1525069)
Backed out changeset ef7b4d60481f (bug 1525069)
Backed out changeset 898be859c1a4 (bug 1525069)
parent 94eb92d0
Loading
Loading
Loading
Loading
+1 −40
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@

from __future__ import absolute_import, print_function

import ctypes
import os
import sys
import subprocess
@@ -12,34 +11,6 @@ import subprocess
from mozboot.base import BaseBootstrapper


def is_aarch64_host():
    wintypes = ctypes.wintypes
    kernel32 = ctypes.windll.kernel32
    IMAGE_FILE_MACHINE_UNKNOWN = 0
    IMAGE_FILE_MACHINE_ARM64 = 0xAA64

    try:
        iswow64process2 = kernel32.IsWow64Process2
    except:
        # If we can't access the symbol, we know we're not on aarch64.
        return False

    currentProcess = kernel32.GetCurrentProcess()
    processMachine = wintypes.USHORT()
    nativeMachine = wintypes.USHORT()
    processMachine = IMAGE_FILE_MACHINE_UNKNOWN
    nativeMachine = IMAGE_FILE_MACHINE_UNKNOWN

    gotValue = iswow64process2(currentProcess,
                               ctypes.byref(processMachine)
                               ctypes.byref(nativeMachine))
    # If this call fails, we have no idea.
    if not gotValue:
        return False

    return nativeMachine == IMAGE_FILE_MACHINE_ARM64


class MozillaBuildBootstrapper(BaseBootstrapper):
    '''Bootstrapper for MozillaBuild to install rustup.'''
    def __init__(self, no_interactive=False, no_system_changes=False):
@@ -78,24 +49,14 @@ class MozillaBuildBootstrapper(BaseBootstrapper):
        self.install_toolchain_static_analysis(checkout_root)

    def ensure_stylo_packages(self, state_dir, checkout_root):
        # On-device artifact builds are supported; on-device desktop builds are not.
        if is_aarch64_host():
            raise Exception('You should not be performing desktop builds on an '
                            'AArch64 device.  If you want to do artifact builds '
                            'instead, please choose the appropriate artifact build '
                            'option when beginning bootstrap.')

        from mozboot import stylo
        self.install_toolchain_artifact(state_dir, checkout_root, stylo.WINDOWS_CLANG)
        self.install_toolchain_artifact(state_dir, checkout_root, stylo.WINDOWS_CBINDGEN)

    def ensure_node_packages(self, state_dir, checkout_root):
        from mozboot import node
        # We don't have native aarch64 node available, but aarch64 windows
        # runs x86 binaries, so just use the x86 packages for such hosts.
        node_artifact = node.WIN32 if is_aarch64_host() else node.WIN64
        self.install_toolchain_artifact(
            state_dir, checkout_root, node_artifact)
            state_dir, checkout_root, node.WINDOWS)

    def _update_package_manager(self):
        pass
+1 −2
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@

from __future__ import absolute_import, print_function, unicode_literals

WIN32 = 'win32-node'
WIN64 = 'win64-node'
WINDOWS = 'win64-node'
LINUX = 'linux64-node'
OSX = 'macosx64-node'
+1 −4
Original line number Diff line number Diff line
@@ -82,11 +82,8 @@ class WindowsBootstrapper(BaseBootstrapper):

    def ensure_node_packages(self, state_dir, checkout_root):
        from mozboot import node
        # We don't have native aarch64 node available, but aarch64 windows
        # runs x86 binaries, so just use the x86 packages for such hosts.
        node_artifact = node.WIN32 if is_aarch64_host() else node.WIN64
        self.install_toolchain_artifact(
            state_dir, checkout_root, node_artifact)
            state_dir, checkout_root, node.WINDOWS)

    def _update_package_manager(self):
        self.pacman_update()
+0 −1
Original line number Diff line number Diff line
@@ -93,7 +93,6 @@ treeherder:

index:
    products:
        - 'bootstrap-support'
        - 'firefox'
        - 'fennec'
        - 'mobile'
+0 −23
Original line number Diff line number Diff line
@@ -184,29 +184,6 @@ win64-aarch64-rust:
        ]
        toolchain-artifact: public/build/rustc.tar.bz2

win32-node:
    description: "Node repack toolchain build"
    index:
        product: bootstrap-support
        job-name: win32-node
    treeherder:
        kind: build
        platform: toolchains/opt
        symbol: TW32(node)
        tier: 1
    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
    worker:
        docker-image: {in-tree: toolchain-build}
        max-run-time: 1800
    run:
        using: toolchain-script
        script: repack-node.sh
        arguments: ['win32']
        toolchain-artifact: public/build/node.tar.bz2
    run-on-projects:
        - trunk
        - try

win64-node:
    description: "Node repack toolchain build"
    treeherder:
Loading