Documentation ¶
Index ¶
Constants ¶
const ( //ELFSectionName is the name of our ELF section of "bitcode paths". ELFSectionName = ".llvm_bc" //DarwinSegmentName is the name of our MACH-O segment of "bitcode paths". DarwinSegmentName = "__WLLVM" //DarwinSectionName is the name of our MACH-O section of "bitcode paths". DarwinSectionName = "__llvm_bc" )
Variables ¶
var LLVMARName string
LLVMARName is the user configured name of the llvm-ar.
var LLVMBitcodeStorePath string
LLVMBitcodeStorePath is the user configured location of the bitcode archive.
var LLVMCCName string
LLVMCCName is the user configured name of the clang compiler.
var LLVMCXXName string
LLVMCXXName is the user configured name of the clang++ compiler.
var LLVMConfigureOnly string
LLVMConfigureOnly is the user configured flag indicating a single pass mode is required.
var LLVMLINKName string
LLVMLINKName is the user configured name of the llvm-link.
var LLVMLoggingFile string
LLVMLoggingFile is the path to the optional logfile (useful when configuring)
var LLVMLoggingLevel string
LLVMLoggingLevel is the user configured logging level: ERROR, WARNING, INFO, DEBUG.
var LLVMToolChainBinDir string
LLVMToolChainBinDir is the user configured directory holding the LLVM binary tools.
var LogDebug = makeLogger(debugV)
LogDebug logs to the configured stream if the logging level is DEBUG.
var LogError = makeLogger(errorV)
LogError logs to the configured stream if the logging level is ERROR or lower.
var LogInfo = makeLogger(infoV)
LogInfo logs to the configured stream if the logging level is INFO or lower.
var LogWarning = makeLogger(warningV)
LogWarning logs to the configured stream if the logging level is WARNING or lower.
var LogWrite = makeLogger(-1)
LogWrite writes to the logging stream, irregardless of levels.
Functions ¶
func CheckDefer ¶
func CheckDefer(f func() error)
CheckDefer is used to check the return values of defers
func Extract ¶
func Extract(args []string)
Extract extracts the LLVM bitcode according to the arguments it is passed.
func GetCompilerExecName ¶
GetCompilerExecName returns the full path of the executable
func LogFatal ¶
func LogFatal(format string, a ...interface{})
LogFatal logs to the configured stream and then exits.
func SanityCheck ¶
func SanityCheck()
SanityCheck performs the environmental sanity check.
Performs the following checks in order: 0. Check the logging 1. Check that the OS is supported. 2. Checks that the compiler settings make sense. 3. Checks that the needed LLVM utilities exists. 4. Check that the store, if set, exists.
Types ¶
This section is empty.