I'm not currently using the patcher, but I was trying it out (seems right for patching some OCaml runtime headers for a cusotm CIL analysis) and noticed it wasn't actually working. Looks like a previous patch to remove MSVC was a bit too eager, and actually removed the line that runs the preprocessor. Restore it with this patch.
Commit b01b40430 has removed MSVC, but also removed the 'system' line, which was important for its side effect of running the preprocessor (even if the body of the if would never be entered with GCC)
Fixes: b01b40430 ("Remove remaining MSVC things")
Tested with:
$ perl -I$(opam var lib)/perl5 lib/perl5/patcher --patch=mypatch.cillypatch --dest=destpatch --ufile caml/misc.h --verbose --mode=GNUCC -I$(ocamlc -where)
Patching files for GNU CC version gcc_11
Loaded patches from mypatch.cillypatch
Patching "caml/misc.h"
Absolute name is /home/edwin/.opam/4.14.0/lib/ocaml/caml/misc.h
Destination is destpatch/gcc_11/caml/misc.h
I'm not currently using the patcher, but I was trying it out (seems right for patching some OCaml runtime headers for a cusotm CIL analysis) and noticed it wasn't actually working. Looks like a previous patch to remove MSVC was a bit too eager, and actually removed the line that runs the preprocessor. Restore it with this patch.
Commit b01b40430 has removed MSVC, but also removed the 'system' line, which was important for its side effect of running the preprocessor (even if the body of the if would never be entered with GCC)
Fixes: b01b40430 ("Remove remaining MSVC things")
Tested with:
With the following mypatch.cillypatch as a test:
And the patcher has performed the following modification: