From 1508648f30cbaf5a3590572b2313fb5b595a7946 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Tue, 15 Jan 2019 04:21:56 -0800 Subject: Build & fix the JIT. --- tools/amalgamate.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/amalgamate.py') diff --git a/tools/amalgamate.py b/tools/amalgamate.py index 4739a94..9ad0286 100755 --- a/tools/amalgamate.py +++ b/tools/amalgamate.py @@ -51,6 +51,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() -- cgit v1.2.3 From 9bc7973e3893a72a62e75b8c7075d692c8794ec1 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Wed, 23 Jan 2019 17:16:31 -0800 Subject: Fixes for Google import. --- tools/amalgamate.py | 4 ++-- upb/handlers-inl.h | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'tools/amalgamate.py') diff --git a/tools/amalgamate.py b/tools/amalgamate.py index 9ad0286..9640201 100755 --- a/tools/amalgamate.py +++ b/tools/amalgamate.py @@ -16,11 +16,11 @@ 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('#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(open("upb/port_def.inc").read()) def finish(self): diff --git a/upb/handlers-inl.h b/upb/handlers-inl.h index 5677a4a..40a0047 100644 --- a/upb/handlers-inl.h +++ b/upb/handlers-inl.h @@ -7,6 +7,8 @@ #define UPB_HANDLERS_INL_H_ #include +#include +#include "upb/handlers.h" #ifdef __cplusplus @@ -162,8 +164,8 @@ struct FuncInfo { * These functions are not bound to a handler data so have no data or cleanup * handler. */ struct UnboundFunc { - CleanupFunc *GetCleanup() { return NULL; } - void *GetData() { return NULL; } + CleanupFunc *GetCleanup() { return nullptr; } + void *GetData() { return nullptr; } }; template -- cgit v1.2.3 From ad905b08f5f93b497311290fb4df4059ccd083eb Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Sun, 17 Feb 2019 20:36:26 -0800 Subject: Fixed amalgamation to properly include stdint.h first for UPB_SIZE(). --- tools/amalgamate.py | 1 + upb/port_def.inc | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'tools/amalgamate.py') diff --git a/tools/amalgamate.py b/tools/amalgamate.py index 9640201..374d126 100755 --- a/tools/amalgamate.py +++ b/tools/amalgamate.py @@ -21,6 +21,7 @@ class Amalgamator: self.output_c.write(open("upb/port_def.inc").read()) self.output_h.write("/* Amalgamated source file */\n") + self.output_h.write('#include ') self.output_h.write(open("upb/port_def.inc").read()) def finish(self): diff --git a/upb/port_def.inc b/upb/port_def.inc index 33ff78c..fe975a0 100644 --- a/upb/port_def.inc +++ b/upb/port_def.inc @@ -1,4 +1,8 @@ +#ifndef UINTPTR_MAX +#error must include stdint.h first +#endif + #if UINTPTR_MAX == 0xffffffff #define UPB_SIZE(size32, size64) size32 #else -- cgit v1.2.3