| 1 | contrib_plugins = [ |
| 2 | 'bbv.c', |
| 3 | 'cache.c', |
| 4 | 'cflow.c', |
| 5 | 'drcov.c', |
| 6 | 'execlog.c', |
| 7 | 'hotblocks.c', |
| 8 | 'hotpages.c', |
| 9 | 'howvec.c', |
| 10 | 'hwprofile.c', |
| 11 | 'ips.c', |
| 12 | 'stoptrigger.c', |
| 13 | 'traps.c', |
| 14 | 'uftrace.c', |
| 15 | ] |
| 16 | |
| 17 | if host_os != 'windows' |
| 18 | # lockstep uses socket.h |
| 19 | contrib_plugins += 'lockstep.c' |
| 20 | endif |
| 21 | |
| 22 | if host_os == 'linux' |
| 23 | # dlcall passes guest calls through to host libraries; linux-user only |
| 24 | contrib_plugins += 'dlcall.c' |
| 25 | endif |
| 26 | |
| 27 | if 'cpp' in all_languages |
| 28 | contrib_plugins += 'cpp.cpp' |
| 29 | endif |
| 30 | |
| 31 | t = [] |
| 32 | if get_option('plugins') |
| 33 | foreach i : contrib_plugins |
| 34 | t += shared_module(fs.stem(i), files(i), |
| 35 | dependencies: plugins_deps) |
| 36 | endforeach |
| 37 | endif |
| 38 | if t.length() > 0 |
| 39 | alias_target('contrib-plugins', t) |
| 40 | else |
| 41 | run_target('contrib-plugins', command: [python, '-c', '']) |
| 42 | endif |
| 43 | |
| 44 | plugin_modules += t |