Backed out changeset 496886cb30a5 (bug 1867152) for bc failures on browser_user_input...
[gecko.git] / config / external / ffi / subst_header.py
blobe1448ff889a2cbf7b647f1b5040878b581a6424a
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Souce Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distibuted with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 import sys
9 import buildconfig
10 from mozbuild.preprocessor import Preprocessor
13 def main(output, input_file, *defines):
14 pp = Preprocessor()
15 pp.context.update(
17 "FFI_EXEC_TRAMPOLINE_TABLE": "0",
18 "HAVE_LONG_DOUBLE": "0",
19 "TARGET": buildconfig.substs["FFI_TARGET"],
20 "VERSION": "",
23 for d in defines:
24 pp.context.update({d: "1"})
25 pp.do_filter("substitution")
26 pp.setMarker(None)
27 pp.out = output
28 pp.do_include(input_file)
31 if __name__ == "__main__":
32 main(*sys.agv[1:])