headers = llvm-c/Core.h llvm-c/Target.h llvm-c/Analysis.h llvm-c/BitWriter.h \
    llvm-c/BitReader.h llvm-c/Linker.h DebugInfoC.h

headerFilter = llvm-c/* DebugInfoC.h

compilerOpts = -std=c99 -fPIC \
    -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers \
    -pedantic -Wno-long-long -Wcovered-switch-default -Wdelete-non-virtual-dtor \
    -DNDEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS


linker = clang++

linkerOpts = -fPIC -fvisibility-inlines-hidden \
    -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers \
    -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor \
    -std=c++11 \
    -DNDEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS \
    -ldebugInfo -lLLVMTarget -lLLVMMC -lLLVMLinker -lLLVMTransformUtils -lLLVMBitWriter \
    -lLLVMBitReader -lLLVMAnalysis -lLLVMProfileData -lLLVMCore -lLLVMSupport

# ./llvm-config --libs analysis bitreader bitwriter core linker target


linkerOpts.osx = \
    -Wl,-search_paths_first -Wl,-headerpad_max_install_names \
    -lpthread -lz -lm  -lcurses

linkerOpts.linux=\
     -Wl,-z,noexecstack \
     -lrt -ldl -lpthread -lz -lm

linkerOpts.mingw = -lole32 -luuid -static-libgcc -static-libstdc++ \
    -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive,-Bdynamic

excludedFunctions = LLVMInitializeAllAsmParsers LLVMInitializeAllAsmPrinters LLVMInitializeAllDisassemblers \
    LLVMInitializeAllTargetInfos LLVMInitializeAllTargetMCs LLVMInitializeAllTargets LLVMInitializeNativeTarget \
    LLVMInitializeNativeAsmParser LLVMInitializeNativeAsmPrinter LLVMInitializeNativeDisassembler

strictEnums = LLVMIntPredicate LLVMOpcode LLVMDLLStorageClass LLVMCallConv LLVMThreadLocalMode LLVMAtomicOrdering