shared

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2018 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
var LLVMARName string

LLVMARName is the user configured name of the llvm-ar.

View Source
var LLVMBitcodeStorePath string

LLVMBitcodeStorePath is the user configured location of the bitcode archive.

View Source
var LLVMCCName string

LLVMCCName is the user configured name of the clang compiler.

View Source
var LLVMCXXName string

LLVMCXXName is the user configured name of the clang++ compiler.

View Source
var LLVMConfigureOnly string

LLVMConfigureOnly is the user configured flag indicating a single pass mode is required.

View Source
var LLVMLINKName string

LLVMLINKName is the user configured name of the llvm-link.

View Source
var LLVMLoggingFile string

LLVMLoggingFile is the path to the optional logfile (useful when configuring)

View Source
var LLVMLoggingLevel string

LLVMLoggingLevel is the user configured logging level: ERROR, WARNING, INFO, DEBUG.

View Source
var LLVMToolChainBinDir string

LLVMToolChainBinDir is the user configured directory holding the LLVM binary tools.

View Source
var LogDebug = makeLogger(debugV)

LogDebug logs to the configured stream if the logging level is DEBUG.

View Source
var LogError = makeLogger(errorV)

LogError logs to the configured stream if the logging level is ERROR or lower.

View Source
var LogInfo = makeLogger(infoV)

LogInfo logs to the configured stream if the logging level is INFO or lower.

View Source
var LogWarning = makeLogger(warningV)

LogWarning logs to the configured stream if the logging level is WARNING or lower.

View Source
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 Compile

func Compile(args []string, compiler string) (exitCode int)

Compile wraps a call to the compiler with the given args.

func Extract

func Extract(args []string)

Extract extracts the LLVM bitcode according to the arguments it is passed.

func GetCompilerExecName

func GetCompilerExecName(compiler string) string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL