Bug 1447611: Remove --enable-stylo and --enable-stylo-build-bindgen. r=froydnj

Will remove the prefs and stuff in a followup.

MozReview-Commit-ID: HVyfbHOEQYI
This commit is contained in:
Emilio Cobos Álvarez 2018-03-21 12:45:06 +01:00
parent bb732ebdcf
commit 24cf27d33c
15 changed files with 20 additions and 143 deletions

View File

@ -2,7 +2,7 @@
args = [
"-x", "c++", "-std=c++14", "-fno-sized-deallocation",
"-DTRACING=1", "-DIMPL_LIBXUL", "-DMOZ_STYLO_BINDINGS=1",
"-DMOZILLA_INTERNAL_API", "-DRUST_BINDGEN", "-DMOZ_STYLO"
"-DMOZILLA_INTERNAL_API", "-DRUST_BINDGEN"
]
"family=unix" = ["-DOS_POSIX=1"]
"os=solaris" = ["-DOS_SOLARIS=1"]

View File

@ -482,21 +482,8 @@ let retainedDisplayListsEnabled = prefs.getBoolPref("layout.display-list.retain"
sandbox.retainedDisplayLists = retainedDisplayListsEnabled && !g.compareRetainedDisplayLists;
sandbox.compareRetainedDisplayLists = g.compareRetainedDisplayLists;
#ifdef MOZ_STYLO
let styloEnabled = false;
// Perhaps a bit redundant in places, but this is easier to compare with the
// the real check in `nsLayoutUtils.cpp` to ensure they test the same way.
if (env.get("STYLO_FORCE_ENABLED")) {
styloEnabled = true;
} else if (env.get("STYLO_FORCE_DISABLED")) {
styloEnabled = false;
} else {
styloEnabled = prefs.getBoolPref("layout.css.servo.enabled", false);
}
sandbox.stylo = styloEnabled;
#else
sandbox.stylo = false;
#endif
// TODO(emilio): Remove the remaining reftest expectations that mention stylo.
sandbox.stylo = true;
sandbox.skiaPdf = false;

View File

@ -5920,18 +5920,12 @@ pref("media.block-autoplay-until-in-foreground", true);
// Is Stylo CSS support built and enabled?
// Only define these prefs if Stylo support is actually built in.
#ifdef MOZ_STYLO
#ifdef MOZ_STYLO_ENABLE
pref("layout.css.servo.enabled", true);
#else
pref("layout.css.servo.enabled", false);
#endif
// Whether Stylo is enabled for chrome document?
// If Stylo is not enabled, this pref doesn't take any effect.
// Note that this pref is only read once when requested. Changing it
// at runtime may have no effect.
pref("layout.css.servo.chrome.enabled", true);
#endif
// TODO: Bug 1324406: Treat 'data:' documents as unique, opaque origins
// If true, data: URIs will be treated as unique opaque origins, hence will use

View File

@ -83,7 +83,8 @@ def build_dict(config, env=os.environ):
d['datareporting'] = bool(substs.get('MOZ_DATA_REPORTING'))
d['healthreport'] = substs.get('MOZ_SERVICES_HEALTHREPORT') == '1'
d['sync'] = substs.get('MOZ_SERVICES_SYNC') == '1'
d['stylo'] = substs.get('MOZ_STYLO_ENABLE') == '1'
# FIXME(emilio): We need to update a lot of WPT expectations before removing this.
d['stylo'] = True
d['asan'] = substs.get('MOZ_ASAN') == '1'
d['tsan'] = substs.get('MOZ_TSAN') == '1'
d['ubsan'] = substs.get('MOZ_UBSAN') == '1'

View File

@ -69,9 +69,6 @@ class MachCommands(MachCommandBase):
else:
os.environ['STYLO_THREADS'] = '4'
if 'enable_stylo' in kwargs and kwargs['enable_stylo']:
os.environ['STYLO_FORCE_ENABLED'] = '1'
if 'enable_webrender' in kwargs and kwargs['enable_webrender']:
os.environ['MOZ_WEBRENDER'] = '1'
os.environ['MOZ_ACCELERATED'] = '1'
@ -205,9 +202,6 @@ class MachCommands(MachCommandBase):
dest='settleWaitTime',
help='Seconds to wait for things to settled down. '
'Defaults to %s.' % SETTLE_WAIT_TIME)
@CommandArgument('--enable-stylo', group='AWSY', action='store_true',
dest='enable_stylo', default=False,
help='Enable Stylo.')
@CommandArgument('--single-stylo-traversal', group='AWSY', action='store_true',
dest='single_stylo_traversal', default=False,
help='Set STYLO_THREADS=1.')

View File

@ -175,8 +175,8 @@ class VerifyToolsMixin(object):
mozinfo.update({"e10s": e10s})
headless = self.config.get('headless', False)
mozinfo.update({"headless": headless})
stylo = self.config.get('enable_stylo', False)
mozinfo.update({'stylo': stylo})
# FIXME(emilio): Need to update test expectations.
mozinfo.update({'stylo': True})
mozinfo.update({'verify': True})
self.info("Verification using mozinfo: %s" % str(mozinfo.info))

View File

@ -163,12 +163,6 @@ class DesktopUnittest(TestingMixin, MercurialScript, BlobUploadMixin, MozbaseMix
"default": False,
"help": "Forcibly enable single thread traversal in Stylo with STYLO_THREADS=1"}
],
[["--enable-stylo"], {
"action": "store_true",
"dest": "enable_stylo",
"default": False,
"help": "Run tests with Stylo enabled"}
],
[["--enable-webrender"], {
"action": "store_true",
"dest": "enable_webrender",
@ -235,9 +229,6 @@ class DesktopUnittest(TestingMixin, MercurialScript, BlobUploadMixin, MozbaseMix
if c['e10s']:
perfherder_options.append('e10s')
if c['enable_stylo']:
perfherder_options.append('stylo')
self.resource_monitor_perfherder_id = ('.'.join(perfherder_parts),
perfherder_options)
@ -855,9 +846,6 @@ class DesktopUnittest(TestingMixin, MercurialScript, BlobUploadMixin, MozbaseMix
else:
env['STYLO_THREADS'] = '4'
if self.config['enable_stylo']:
env['STYLO_FORCE_ENABLED'] = '1'
env = self.query_env(partial_env=env, log_level=INFO)
cmd_timeout = self.get_timeout_for_category(suite_category)

View File

@ -88,18 +88,6 @@ class WebPlatformTest(TestingMixin, MercurialScript, BlobUploadMixin, CodeCovera
"default": False,
"help": "Forcibly enable single thread traversal in Stylo with STYLO_THREADS=1"}
],
[["--enable-stylo"], {
"action": "store_true",
"dest": "enable_stylo",
"default": False,
"help": "Run tests with Stylo enabled"}
],
[["--disable-stylo"], {
"action": "store_true",
"dest": "disable_stylo",
"default": False,
"help": "Run tests with Stylo disabled"}
],
] + copy.deepcopy(testing_config_options) + \
copy.deepcopy(blobupload_config_options) + \
copy.deepcopy(code_coverage_config_options)
@ -322,20 +310,11 @@ class WebPlatformTest(TestingMixin, MercurialScript, BlobUploadMixin, CodeCovera
env['MOZ_HEADLESS_WIDTH'] = self.config['headless_width']
env['MOZ_HEADLESS_HEIGHT'] = self.config['headless_height']
if self.config['disable_stylo']:
if self.config['single_stylo_traversal']:
self.fatal("--disable-stylo conflicts with --single-stylo-traversal")
if self.config['enable_stylo']:
self.fatal("--disable-stylo conflicts with --enable-stylo")
if self.config['single_stylo_traversal']:
env['STYLO_THREADS'] = '1'
else:
env['STYLO_THREADS'] = '4'
if self.config['enable_stylo']:
env['STYLO_FORCE_ENABLED'] = '1'
env = self.query_env(partial_env=env, log_level=INFO)
start_time = datetime.now()

View File

@ -484,7 +484,6 @@ def get_browser_config(config):
'xperf_path': None,
'error_filename': None,
'no_upload_results': False,
'enable_stylo': True,
'stylothreads': 0,
'subtests': None,
}

View File

@ -136,7 +136,6 @@ class Test_get_browser_config(object):
'xperf_path',
'error_filename',
'no_upload_results',
'enable_stylo',
'disable_stylo',
'stylothreads',
'subtests']

View File

@ -4,15 +4,10 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
gkrust_features = []
if CONFIG['MOZ_STYLO']:
gkrust_features += ['servo']
gkrust_features = ['servo', 'bindgen']
if CONFIG['MOZ_STYLO_BINDGEN']:
gkrust_features += ['bindgen']
if CONFIG['MOZ_DEBUG']:
gkrust_features += ['gecko_debug']
if CONFIG['MOZ_DEBUG']:
gkrust_features += ['gecko_debug']
if CONFIG['MOZ_BUILD_WEBRENDER']:
gkrust_features += ['quantum_render']

View File

@ -334,11 +334,5 @@ this.AppConstants = Object.freeze({
false,
#endif
MOZ_STYLO:
#ifdef MOZ_STYLO
true,
#else
false,
#endif
MOZ_STYLO: true,
});

View File

@ -550,47 +550,6 @@ id_and_secret_keyfile('Leanplum SDK')
simple_keyfile('Pocket API')
# Servo integration
# ==============================================================
option('--enable-stylo', nargs='?', choices=('build',),
help='Include Stylo in the build. "build" means to disable Stylo at ' +
'runtime.')
@depends('--enable-stylo', '--help')
def stylo_config(value, _):
# If nothing is specified, default to building and enabling Stylo,
# and not building the old style system.
build_stylo = True
enable_stylo = True
old_style = None
if len(value) and value[0] == 'build':
# Build but disable by request.
enable_stylo = None
old_style = True
elif value.origin != 'default' and not bool(value):
# Disable stylo entirely.
old_style = True
build_stylo = None
enable_stylo = None
return namespace(
build = build_stylo,
enable = enable_stylo,
old_style = old_style,
)
option('--disable-stylo-build-bindgen',
help='Disable build-time bindgen for Stylo')
@depends('--enable-stylo-build-bindgen', '--enable-compile-environment')
def building_stylo_bindgen(bindgen_enabled, compile_environment):
if not compile_environment:
return False
if not bindgen_enabled:
return False
return True
# We support setting up the appropriate options for Stylo's build-time
# bindings generation via setting LLVM_CONFIG or by providing explicit
# configure options. The Windows installer of LLVM/Clang doesn't provide
@ -640,10 +599,10 @@ def llvm_config_paths(host):
return llvm_config_progs
llvm_config = check_prog('LLVM_CONFIG', llvm_config_paths,
when=building_stylo_bindgen,
when='--enable-compile-environment',
what='llvm-config', allow_missing=True)
with only_when(building_stylo_bindgen):
with only_when('--enable-compile-environment'):
option('--with-libclang-path', nargs=1,
help='Absolute path to a directory containing Clang/LLVM libraries for Stylo (version 3.9.x or above)')
option('--with-clang-path', nargs=1,
@ -727,15 +686,15 @@ with only_when(building_stylo_bindgen):
if not clang_resolved:
die(dedent('''\
The file {} returned by `llvm-config {}` does not exist.
clang is required to build Stylo. Please install the necessary packages,
run `mach bootstrap`, or add --disable-stylo to your mozconfig.
clang is required to build Firefox. Please install the
necessary packages, or run `mach bootstrap`.
'''.format(clang_path, '--bindir')))
if not os.path.exists(libclang_path):
die(dedent('''\
The directory {} returned by `llvm-config {}` does not exist.
clang is required to build Stylo. Please install the necessary packages,
run `mach bootstrap`, or add --disable-stylo to your mozconfig.
clang is required to build Firefox. Please install the
necessary packages, or run `mach bootstrap`.
'''.format(libclang_path, libclang_arg)))
(found, searched) = search_for_libclang(libclang_path)
@ -743,8 +702,8 @@ with only_when(building_stylo_bindgen):
die(dedent('''\
Could not find the clang shared library in the path {}
returned by `llvm-config {}` (searched for files {}).
clang is required to build Stylo. Please install the necessary packages,
run `mach bootstrap`, or add --disable-stylo to your mozconfig.
clang is required to build Firefox. Please install the
necessary packages, or run `mach bootstrap`.
'''.format(libclang_path, libclang_arg, searched)))
return namespace(
@ -787,14 +746,6 @@ with only_when(building_stylo_bindgen):
set_config('MOZ_LIBCLANG_PATH', bindgen_config_paths.libclang_path)
set_config('MOZ_CLANG_PATH', bindgen_config_paths.clang_path)
set_config('MOZ_STYLO_BINDGEN', depends_if('--enable-stylo-build-bindgen')(lambda _: True))
set_config('MOZ_STYLO', stylo_config.build)
set_define('MOZ_STYLO', stylo_config.build)
set_config('MOZ_STYLO_ENABLE', stylo_config.enable)
set_define('MOZ_STYLO_ENABLE', stylo_config.enable)
set_config('MOZ_OLD_STYLE', stylo_config.old_style)
set_define('MOZ_OLD_STYLE', stylo_config.old_style)
option('--with-servo', env='SERVO_TARGET_DIR', nargs=1,
help='Absolute path of the target directory where libgeckoservo can '

View File

@ -91,13 +91,11 @@ ifdef MOZ_ASAN
$(PYTHON) $(MOZILLA_DIR)/build/unix/rewrite_asan_dylib.py $(DIST)/$(MOZ_PKG_DIR)$(_BINPATH)
endif # MOZ_ASAN
endif # Darwin
ifdef MOZ_STYLO
ifndef MOZ_ARTIFACT_BUILDS
@echo 'Packing stylo binding files...'
cd '$(DIST)/rust_bindings/style' && \
zip -r5D '$(ABS_DIST)/$(PKG_PATH)$(STYLO_BINDINGS_PACKAGE)' .
endif # MOZ_ARTIFACT_BUILDS
endif # MOZ_STYLO
prepare-package: stage-package

View File

@ -407,6 +407,7 @@ UPLOAD_FILES= \
$(call QUOTED_WILDCARD,$(topobjdir)/$(MOZ_BUILD_APP)/installer/windows/instgen/setup.exe) \
$(call QUOTED_WILDCARD,$(topobjdir)/$(MOZ_BUILD_APP)/installer/windows/instgen/setup-stub.exe) \
$(call QUOTED_WILDCARD,$(topsrcdir)/toolchains.json) \
$(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(STYLO_BINDINGS_PACKAGE)) \
$(if $(UPLOAD_EXTRA_FILES), $(foreach f, $(UPLOAD_EXTRA_FILES), $(wildcard $(DIST)/$(f))))
ifneq ($(filter-out en-US x-test,$(AB_CD)),)
@ -423,9 +424,6 @@ ifdef MOZ_CODE_COVERAGE
$(NULL)
endif
ifdef MOZ_STYLO
UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(STYLO_BINDINGS_PACKAGE))
endif
ifdef ENABLE_MOZSEARCH_PLUGIN
UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(MOZSEARCH_ARCHIVE_BASENAME).zip)