Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow `./mach build` to enable Servo's headless mode #7734

Merged
merged 2 commits into from Dec 4, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Allow `./mach build` to enable Servo's headless mode

As mentioned in #7512 and #7637, the environment variable SERVO_HEADLESS
enables building the OSMesa version of Servo when it is set to 1.

Instead, this should be a command line option to mach's build command.

Fixes #7637.
  • Loading branch information
nerith committed Dec 3, 2015
commit ff853e0d4add97b78515c58d80c7c9b2f69056b8
@@ -134,6 +134,10 @@ class MachCommands(CommandBase):
@CommandArgument('--dev', '-d',
action='store_true',
help='Build in development mode')
@CommandArgument('--headless',
default=None,
action='store_true',
help='Enable headless mode (OSMesa)')
@CommandArgument('--jobs', '-j',
default=None,
help='Number of jobs to run in parallel')
@@ -155,7 +159,7 @@ class MachCommands(CommandBase):
@CommandArgument('params', nargs='...',
help="Command-line arguments to be passed through to Cargo")
def build(self, target=None, release=False, dev=False, jobs=None,
features=None, android=None, verbose=False, debug_mozjs=False, params=None):
features=None, headless=False, android=None, verbose=False, debug_mozjs=False, params=None):
if android is None:
android = self.config["build"]["android"]
features = features or []
@@ -203,9 +207,13 @@ def build(self, target=None, release=False, dev=False, jobs=None,
if debug_mozjs or self.config["build"]["debug-mozjs"]:
features += ["script/debugmozjs"]

if is_headless_build():
opts += ["--no-default-features"]
features += ["headless"]
if headless or is_headless_build():
if sys.platform.startswith("linux"):
opts += ["--no-default-features"]
features += ["headless"]
else:
print("Headless mode (OSMesa) is not supported on your platform.")
print("Building without headless mode.")

if android:
features += ["android_glue"]
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.