blob: 2dc2a50bc68f5c4de74bd70134b3c6049945496f [file] [log] [blame]
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Thin wrapper of Mojo's
To generate C++ files from mojom, it is necessary to run three times
- without --generate_non_variant_code or --generate_non_variant_code
- with --generate_non_variant_code only
- with both --generate_non_variant_code and --generate_message_ids
However, gni's "rule" does not support multiple "action"s. So, instead,
use this simple python wrapper.
python ${libbase_ver} \
[... and more args/flags to be passed to the]
from __future__ import print_function
import subprocess
import sys
def main(argv):
subprocess.check_call(argv[2:] + ['--generate_non_variant_code'])
subprocess.check_call(argv[2:] + ['--generate_non_variant_code',
if __name__ == '__main__':