Bug 1310852 - part 4 - always download packages for stylo during mach bootstrap; r=rillian

With configure now being able to auto-detect the presence of a `mach
bootstrap`-installed clang and libclang and the upcoming
build-by-defaultness of Stylo, we can start downloading these packages
all the time.
This commit is contained in:
Nathan Froyd 2017-06-21 16:36:03 -04:00
parent 3ee2268fa7
commit b9d0fc14d2
5 changed files with 5 additions and 83 deletions

View File

@ -133,17 +133,6 @@ but you may be able to get a recent enough version from a software install
tool or package manager on your system, or directly from https://rust-lang.org/
'''
STYLO_MOZCONFIG = '''
To enable Stylo in your builds, paste the lines between the chevrons
(>>> and <<<) into your mozconfig file:
<<<
ac_add_options --enable-stylo
export LLVM_CONFIG=%s/clang/bin/llvm-config
>>>
'''
BROWSER_ARTIFACT_MODE_MOZCONFIG = '''
Paste the lines between the chevrons (>>> and <<<) into your mozconfig file:
@ -170,7 +159,6 @@ class BaseBootstrapper(object):
def __init__(self, no_interactive=False):
self.package_manager_updated = False
self.no_interactive = no_interactive
self.stylo = False
self.state_dir = None
def install_system_packages(self):
@ -199,8 +187,7 @@ class BaseBootstrapper(object):
Firefox for Desktop can in simple cases determine its build environment
entirely from configure.
'''
if self.stylo:
print(STYLO_MOZCONFIG % self.state_dir)
pass
def install_browser_artifact_mode_packages(self):
'''

View File

@ -92,18 +92,6 @@ Would you like to create this directory?
Your choice: '''
STYLO_DEVELOPMENT_INFO = '''
Stylo is an experimental rewrite of the Gecko style system in Rust to
be faster and make better use of modern computer hardware.
Would you like to download packages for working on Stylo? If you're
not sure, select "No".
1. Yes
2. No
Your choice: '''
STYLO_DIRECTORY_MESSAGE = '''
Stylo packages require a directory to store shared, persistent state.
On this machine, that directory is:
@ -315,30 +303,22 @@ class Bootstrapper(object):
# Install the clang packages needed for developing stylo.
if not self.instance.no_interactive:
choice = self.instance.prompt_int(
prompt=STYLO_DEVELOPMENT_INFO,
low=1,
high=2)
# The best place to install our packages is in the state directory
# we have. If the user doesn't have one, we need them to re-run
# bootstrap and create the directory.
#
# XXX Android bootstrap just assumes the existence of the state
# directory and writes the NDK into it. Should we do the same?
wants_stylo = choice == 1
if wants_stylo and not state_dir_available:
if not state_dir_available:
print(STYLO_DIRECTORY_MESSAGE.format(statedir=state_dir))
sys.exit(1)
if wants_stylo and not have_clone:
if not have_clone:
print(STYLO_REQUIRES_CLONE)
sys.exit(1)
self.instance.stylo = wants_stylo
if wants_stylo:
self.instance.state_dir = state_dir
self.instance.ensure_stylo_packages(state_dir, checkout_root)
self.instance.state_dir = state_dir
self.instance.ensure_stylo_packages(state_dir, checkout_root)
print(self.finished % name)
if not (self.instance.which('rustc') and self.instance._parse_version('rustc') >= MODERN_RUST_VERSION):

View File

@ -4,15 +4,6 @@
from mozboot.base import BaseBootstrapper
STYLO_MOZCONFIG = '''
To enable Stylo in your builds, paste the lines between the chevrons
(>>> and <<<) into your mozconfig file:
<<<
ac_add_options --enable-stylo
>>>
'''
class FreeBSDBootstrapper(BaseBootstrapper):
def __init__(self, version, flavor, **kwargs):
BaseBootstrapper.__init__(self, **kwargs)
@ -72,9 +63,5 @@ class FreeBSDBootstrapper(BaseBootstrapper):
def ensure_stylo_packages(self, state_dir, checkout_root):
self.pkg_install('llvm40')
def suggest_browser_mozconfig(self):
if self.stylo:
print(STYLO_MOZCONFIG)
def upgrade_mercurial(self, current):
self.pkg_install('mercurial')

View File

@ -10,18 +10,6 @@ import tempfile
from mozboot.base import BaseBootstrapper
STYLO_MOZCONFIG = '''
To enable Stylo in your builds, paste the lines between the chevrons
(>>> and <<<) into your mozconfig file:
<<<
ac_add_options --enable-stylo
ac_add_options --with-libclang-path="{state_dir}/clang/bin"
ac_add_options --with-clang-path="{state_dir}/clang/bin/clang.exe"
>>>
'''
class MozillaBuildBootstrapper(BaseBootstrapper):
'''Bootstrapper for MozillaBuild to install rustup.'''
def __init__(self, no_interactive=False):
@ -85,10 +73,6 @@ class MozillaBuildBootstrapper(BaseBootstrapper):
def install_mobile_android_artifact_mode_packages(self):
pass
def suggest_browser_mozconfig(self):
if self.stylo:
print(STYLO_MOZCONFIG.format(state_dir=self.state_dir))
def ensure_stylo_packages(self, state_dir, checkout_root):
import stylo
self.install_tooltool_clang_package(state_dir, checkout_root, stylo.WINDOWS)

View File

@ -8,18 +8,6 @@ import subprocess
from mozboot.base import BaseBootstrapper
STYLO_MOZCONFIG = '''
To enable Stylo in your builds, paste the lines between the chevrons
(>>> and <<<) into your mozconfig file:
<<<
ac_add_options --enable-stylo
ac_add_options --with-libclang-path="{state_dir}/clang/bin"
ac_add_options --with-clang-path="{state_dir}/clang/bin/clang.exe"
>>>
'''
class WindowsBootstrapper(BaseBootstrapper):
'''Bootstrapper for msys2 based environments for building in Windows.'''
@ -80,10 +68,6 @@ class WindowsBootstrapper(BaseBootstrapper):
def install_mobile_android_artifact_mode_packages(self):
raise NotImplementedError('We do not support building Android on Windows. Sorry!')
def suggest_browser_mozconfig(self):
if self.stylo:
print(STYLO_MOZCONFIG.format(state_dir=self.state_dir))
def ensure_stylo_packages(self, state_dir, checkout_root):
import stylo
self.install_tooltool_clang_package(state_dir, checkout_root, stylo.WINDOWS)