diff options
Diffstat (limited to 'tools/m2ctx.py')
| -rwxr-xr-x | tools/m2ctx.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/m2ctx.py b/tools/m2ctx.py index 2d3af5c..6de20af 100755 --- a/tools/m2ctx.py +++ b/tools/m2ctx.py @@ -39,10 +39,10 @@ CPP_FLAGS = [ def import_c_file(in_file) -> str: in_file = os.path.relpath(in_file, root_dir) - cpp_command = ["gcc", "-E", "-P", "-dD", *CPP_FLAGS, in_file] + cpp_command = ["gcc", "-E", "-P", "-undef", "-dD", *CPP_FLAGS, in_file] with tempfile.NamedTemporaryFile(suffix=".c") as tmp: - stock_macros = subprocess.check_output(["gcc", "-E", "-P", "-dM", tmp.name], cwd=root_dir, encoding="utf-8") + stock_macros = subprocess.check_output(["gcc", "-E", "-P", "-undef", "-dM", tmp.name], cwd=root_dir, encoding="utf-8") try: out_text = subprocess.check_output(cpp_command, cwd=root_dir, encoding="utf-8") |
