frida-cycript icon indicating copy to clipboard operation
frida-cycript copied to clipboard

Update meson build

Open duraki opened this issue 3 years ago • 2 comments

Following newest Meson trend, therefore this PR. Updates meson.build script to relative path of cycript0.9.

Test case:

$ rm -rf build && meson build --buildtype minsize --strip && ninja -C build
$ ./build/src/cycript
fcy#

Prior to this PR, following error was showing up:

Compiler for C++ supports arguments -Wno-overloaded-virtual: YES
src/meson.build:168:2: ERROR: File cycript0.9 does not exist.

duraki avatar Apr 01 '22 22:04 duraki

input already guarantees that it is correctly relativized. The problem seems to be that cycript0.9 is a directory, not a file, so Meson cannot really treat it as an input file (and in fact cannot find a file there at all). This means that using files() won't work either.

What you can do is join_paths(meson.current_source_dir(), 'cycript0.9'). Although I am actually not sure what it does at all -- apparently just copies this entire directory to the builddir as is?

You may also want to teach your script to output a depfile suitable for use as the depfile: ... kwarg to custom_target, this should be a file similar to the one gcc emits with the -M family of options: https://ninja-build.org/manual.html#_depfile

eli-schwartz avatar Apr 03 '22 03:04 eli-schwartz

Now uses join_paths as proposed by @eli-schwartz. It builds successfully as well.

duraki avatar Apr 05 '22 23:04 duraki