Open for-just-we opened 1 year ago
This sounds like a Meson bug. It is probably doing some naive somewhere with arguments ending in .so or something. This is just a complete guess though. If you can submit a PR, that would be great!
This sounds like a Meson bug. It is probably doing some naive somewhere with arguments ending in .so or something. This is just a complete guess though. If you can submit a PR, that would be great!
Well, learning the mechanism of meson takes a large part of time. But I do find a way which could bypass this error. That I can imitate wllvm which is basically a wrapper of clang
command. I can build a python project and generate two scripts wclang
and wclang++
which is similar to wllvm
and wllvm++
, wclang
is equally to clang -g -fpass-plugin=xxx
. And export CC=wclang
and export CXX=wclang++
. So I don't need to explicit add the arg -fpass-plugin
to CFLAGS
and can avoid this error.
This can work but can slow down the process of compiling. It may be better to add support for those compilation arguments.
I compile one project glib in oss-fuzz, and add
-fpass-plugin=../pass.so
toCFLAGS
. And when configure the project, error happen. It fail to determine the size ofsize_t
. The part of the output of configuration is:And when I check the
meson-log.txt
, its message is:In the command line
clang /src/glib/_builddir/meson-private/tmp761kib7z/testfile.c -o /src/glib/_builddir/meson-private/tmp761kib7z/output.obj -c -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -Wl,--start-group -fpass-plugin=/extra/libs/TraceLogPass.so -Wl,--end-group -D_FILE_OFFSET_BITS=64 -O0 -Werror=implicit-function-declaration -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -std=gnu99 -Werror
,-fpass-plugin=/extra/libs/TraceLogPass.so
should not be wrapped by-Wl,--start-group -Wl,--end-group
. Why did this happen. Could I fix this?I really need to run the TraceLogPass when compiling. And I find insert this pass into LLVM is much harder. So if meson does not currently support this compile args, could I configure the project with meson without
fpass-plugin=xxx
. And when configuration over, I modify thecompile_commands.json
file to manually insert thefpass-plugin=xxx
to CFLAGS?