Skip to content

Commit

Permalink
Bug 1384258 - Build Stylo by default. r=chmanchester
Browse files Browse the repository at this point in the history
Build Stylo (the styling system from servo) by default in all
builds for win32, win64, macOS and linux64 targets. It was
previously enabled for automation builds, so this just changes
the behaviour for local developer builds.

Note that this introduces a new dependency on libclang for the
binding generator. If you're developing on a tier-1 platform,
run `./mach boostrap` to install a working copy. Otherwise
llvm+libclang 4.0.1 is recommended.

Remove the explicit --enable-stylo=build in mozconfig.stylo
in favour of the configure default.

Add mozconfig.stylo to the hazard and debug-asan mozconfigs
so LLVM_CONFIG is defined properly for those builds.

Based on a patch by Bobby Holly in bug 1356991.

MozReview-Commit-ID: C2wRNl7JHpz

--HG--
extra : rebase_source : 1ed7c36a64e25b235a26864592cd7ea969a4cd25
  • Loading branch information
rillian committed Jul 25, 2017
1 parent b86762c commit c7c885b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
2 changes: 2 additions & 0 deletions browser/config/mozconfigs/linux64/debug-asan
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
ac_add_options --enable-debug
ac_add_options --enable-optimize="-O1"

. $topsrcdir/build/mozconfig.stylo

# ASan specific options on Linux
ac_add_options --enable-valgrind

Expand Down
2 changes: 2 additions & 0 deletions browser/config/mozconfigs/linux64/hazards
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ ac_add_options --enable-elf-hack

. "$topsrcdir/build/unix/mozconfig.stdcxx"

. "$topsrcdir/build/mozconfig.stylo"

# The objdir must be at a known location so its path can be stripped from the
# filenames stored by the analysis
mk_add_options MOZ_OBJDIR=obj-analyzed
Expand Down
4 changes: 0 additions & 4 deletions build/mozconfig.stylo
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
# Tell the build system where to find llvm-config for builds on automation.
export LLVM_CONFIG="${TOOLTOOL_DIR:-$topsrcdir}/clang/bin/llvm-config"

# TODO remove once configure defaults to stylo once stylo enabled
# on all platforms.
ac_add_options --enable-stylo=build
18 changes: 14 additions & 4 deletions toolkit/moz.configure
Original file line number Diff line number Diff line change
Expand Up @@ -593,17 +593,27 @@ id_and_secret_keyfile('Leanplum SDK')
option('--enable-stylo', nargs='?', choices=('build',),
help='Include Stylo in the build and/or enable it at runtime')

@depends('--enable-stylo', '--help')
def stylo_config(value, _):
@depends('--enable-stylo', '--help', target)
def stylo_config(value, _, target):
build_stylo = None
enable_stylo = None

# The default is to not build Stylo at all.
# If nothing is specified, default to building stylo where possible.
if value.origin == 'default':
pass
if target.os == 'GNU' and target.bitness == 32:
# The clang setup we use in automation is a little unusual, and
# doesn't play well with bindgen on 32-bit Linux.
pass
elif target.os == 'Android':
# Stylo on Android is happening Later(tm).
pass
else:
build_stylo = True
elif len(value) and value[0] == 'build':
# Build but disable by request.
build_stylo = True
elif bool(value):
# Build and enable.
build_stylo = True
enable_stylo = True

Expand Down

0 comments on commit c7c885b

Please sign in to comment.