Skip to content

Commit

Permalink
Add separate user_plugins=python to compile pickle/py code ##build
Browse files Browse the repository at this point in the history
  • Loading branch information
trufae authored Jan 23, 2025
1 parent 4d542aa commit d8ad306
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 130 deletions.
21 changes: 13 additions & 8 deletions libr/arch/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ r_arch_sources = [
'p/kvx/plugin.c',
'p/kvx/kvx-dis.c',
'p/kvx/kvx-reg.c',
'p/pickle/plugin.c',
'p/mcore/plugin.c',
'p/mcore/mcore.c',
'p/wasm/plugin.c',
Expand Down Expand Up @@ -151,13 +150,6 @@ r_arch_sources = [
'p/mips_gnu/mips-opc.c',
'p/sh_cs/plugin.c',
'p/tricore_cs/plugin.c',
# python
'p/pyc/plugin.c',
'p/pyc/opcode_all.c',
'p/pyc/opcode_anal.c',
'p/pyc/opcode_arg_fmt.c',
'p/pyc/opcode.c',
'p/pyc/pyc_dis.c',
'p/i8080/i8080.c',
'p/i8080/plugin.c',
'p/gb/plugin.c',
Expand All @@ -172,6 +164,19 @@ r_arch_sources = [
'p/fslsp/plugin.c',
]

if arch_plugins.contains('python') or arch_plugins.contains('pyc') or arch_plugins.contains('pickle')
r_arch_sources += [
# python
'p/pyc/plugin.c',
'p/pyc/opcode_all.c',
'p/pyc/opcode_anal.c',
'p/pyc/opcode_arg_fmt.c',
'p/pyc/opcode.c',
'p/pyc/pyc_dis.c',
'p/pickle/plugin.c'
]
endif

if arch_plugins.contains('x86_nz')
r_arch_sources += [
'p/x86_nz/plugin.c'
Expand Down
2 changes: 1 addition & 1 deletion libr/arch/p/pickle/plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ static bool pickle_encode(RArchSession *s, RAnalOp *op, RArchEncodeMask mask) {

int ob = name_to_op (opstr);
if (ob == OP_FAILURE) {
R_LOG_ERROR ("Unkonwn pickle verb: %s", opstr);
R_LOG_ERROR ("Unknown pickle verb: %s", opstr);
wlen = -1;
} else {
*outbuf = (ut8)ob;
Expand Down
Loading

0 comments on commit d8ad306

Please sign in to comment.