diff options
Diffstat (limited to 'tools/amalgamate.py')
-rwxr-xr-x | tools/amalgamate.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/amalgamate.py b/tools/amalgamate.py index 4739a94..5545af5 100755 --- a/tools/amalgamate.py +++ b/tools/amalgamate.py @@ -16,11 +16,13 @@ class Amalgamator: self.output_h = open(output_path + "upb.h", "w") self.output_c = open(output_path + "upb.c", "w") - self.output_c.write("// Amalgamated source file\n") + self.output_c.write("/* Amalgamated source file */\n") + self.output_c.write('#define _XOPEN_SOURCE 700\n') self.output_c.write('#include "upb.h"\n') self.output_c.write(open("upb/port_def.inc").read()) - self.output_h.write("// Amalgamated source file\n") + self.output_h.write("/* Amalgamated source file */\n") + self.output_h.write('#include <stdint.h>') self.output_h.write(open("upb/port_def.inc").read()) def finish(self): @@ -51,6 +53,10 @@ output_path = sys.argv[2] amalgamator = Amalgamator(include_path, output_path) for filename in sys.argv[3:]: + # Leave JIT out of the amalgamation. + if "x64" in filename or "dynasm" in filename: + continue + amalgamator.add_src(filename.strip()) amalgamator.finish() |