mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-08 20:06:03 +03:00
Add LLVM-pass plugin support to LDC. Commandline flag: -plugin=...
. (#2554)
This adds functionality to load plugins such as the AFL llvm-mode plugin: https://github.com/mirrorer/afl/blob/master/llvm_mode/afl-llvm-pass.so.cc Note that such plugins developed for Clang should also work for LDC !
This commit is contained in:
parent
b22d8cccf3
commit
16ecb3e79f
9 changed files with 196 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
|||
#include "driver/exe_path.h"
|
||||
#include "driver/ldc-version.h"
|
||||
#include "driver/linker.h"
|
||||
#include "driver/plugins.h"
|
||||
#include "driver/targetmachine.h"
|
||||
#include "gen/cl_helpers.h"
|
||||
#include "gen/irstate.h"
|
||||
|
@ -1063,6 +1064,8 @@ int cppmain(int argc, char **argv) {
|
|||
opts::initializeInstrumentationOptionsFromCmdline(
|
||||
*global.params.targetTriple);
|
||||
|
||||
loadAllPlugins();
|
||||
|
||||
Strings libmodules;
|
||||
return mars_mainBody(files, libmodules);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue