godot-mono-builds/files/patches/offsets-tool-extra-cflags_new.diff
2020-05-14 22:01:26 +02:00

23 lines
1.1 KiB
Diff

diff --git a/mono/tools/offsets-tool/offsets-tool.py b/mono/tools/offsets-tool/offsets-tool.py
index 35445ba585c..d1586ee5ecd 100644
--- a/mono/tools/offsets-tool/offsets-tool.py
+++ b/mono/tools/offsets-tool/offsets-tool.py
@@ -54,6 +54,7 @@ class OffsetsTool:
sys.exit (1)
parser = argparse.ArgumentParser ()
+ parser.add_argument ('--extra-cflag=', dest='extra_cflags', action='append', help='extra flags for clang')
parser.add_argument ('--libclang', dest='libclang', help='path to shared library of libclang.{so,dylib}')
parser.add_argument ('--emscripten-sdk', dest='emscripten_path', help='path to emscripten sdk')
parser.add_argument ('--outfile', dest='outfile', help='path to output file', required=True)
@@ -78,6 +79,9 @@ class OffsetsTool:
self.target_args = []
android_api_level = "-D__ANDROID_API=21"
+ if args.extra_cflags:
+ self.target_args += args.extra_cflags
+
if "wasm" in args.abi:
require_emscipten_path (args)
self.sys_includes = [args.emscripten_path + "/system/include", args.emscripten_path + "/system/include/libc", args.emscripten_path + "/system/lib/libc/musl/arch/emscripten"]