Bug 1423809 - Support localized generated files in the tup backend; r=nalexander draft
authorMike Shal <mshal@mozilla.com>
Fri, 08 Dec 2017 13:53:44 -0500
changeset 710984 3a0735f3afc1dd19582a1fcd5ab68c8f13c95768
parent 710921 554fbb5c6e5ba9645c42a0cffe08d623df9e7488
child 710985 b177fb99316fdf8c332dd972bc3e1426fb7190b6
push id92960
push userbmo:mshal@mozilla.com
push dateTue, 12 Dec 2017 22:51:36 +0000
reviewersnalexander
bugs1423809
milestone59.0a1
Bug 1423809 - Support localized generated files in the tup backend; r=nalexander These files fail to build in the tup backend because the --locale argument is missing and scripts like generate_update_locale.py require a locale. Since the tup backend currently only supports en-US, we can just hardcode this argument for now. MozReview-Commit-ID: 7Js1yd9QB01
python/mozbuild/mozbuild/backend/tup.py
--- a/python/mozbuild/mozbuild/backend/tup.py
+++ b/python/mozbuild/mozbuild/backend/tup.py
@@ -326,16 +326,18 @@ class TupOnly(CommonBackend, PartialBack
         # yet, because things they depend on aren't built yet.
         skip_directories = (
             'layout/style/test', # HostSimplePrograms
             'toolkit/library', # libxul.so
         )
         if obj.script and obj.method and obj.relobjdir not in skip_directories:
             backend_file.export_shell()
             cmd = self._py_action('file_generate')
+            if obj.localized:
+                cmd.append('--locale=en-US')
             cmd.extend([
                 obj.script,
                 obj.method,
                 obj.outputs[0],
                 '%s.pp' % obj.outputs[0], # deps file required
             ])
             full_inputs = [f.full_path for f in obj.inputs]
             cmd.extend(full_inputs)