config/make-system-wrappers.py
author Dorel Luca <dluca@mozilla.com>
Sat, 13 Jan 2018 15:17:49 +0200
changeset 399195 64f82460345884dd0f5935645765acccf771d7c4
parent 391140 5a967cc85e28e63c283a81e2c76444a76dfbd266
child 419630 da3c81f986fa63b42a2874b1791eddcdbfbe8424
permissions -rw-r--r--
Backed out 19 changesets (bug 1411654) for Android nightly bustages a=backout Backed out changeset 649e7aa405ca (bug 1411654) Backed out changeset c2e51b70519f (bug 1411654) Backed out changeset a371f3ef4312 (bug 1411654) Backed out changeset db978e230556 (bug 1411654) Backed out changeset 56538ed998cf (bug 1411654) Backed out changeset 6ff0cdf46a3d (bug 1411654) Backed out changeset 0e493bacc5e3 (bug 1411654) Backed out changeset 23cbcf427745 (bug 1411654) Backed out changeset eda74143389f (bug 1411654) Backed out changeset 359fadf9b3e9 (bug 1411654) Backed out changeset 5c64eda20f1e (bug 1411654) Backed out changeset bffb6a5b78d1 (bug 1411654) Backed out changeset 43787f4089c3 (bug 1411654) Backed out changeset 9141bbdfd13b (bug 1411654) Backed out changeset 108674372ef7 (bug 1411654) Backed out changeset fb15e1f54987 (bug 1411654) Backed out changeset 264476c77210 (bug 1411654) Backed out changeset d23f467218da (bug 1411654) Backed out changeset 78576ff98660 (bug 1411654)

# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
from __future__ import print_function
import os
import sys
from mozbuild.util import FileAvoidWrite

header_template = '''#pragma GCC system_header
#pragma GCC visibility push(default)
#include_next <%(header)s>
#pragma GCC visibility pop
'''


# The 'unused' arg is the output file from the file_generate action. We actually
# generate all the files in header_list
def gen_wrappers(unused, outdir, *header_list):
    for header in header_list:
        with FileAvoidWrite(os.path.join(outdir, header)) as f:
            f.write(header_template % {
                'header': header,
            })