2017-06-22 01:34:56 +02:00
|
|
|
package main
|
2017-06-22 21:14:00 +02:00
|
|
|
|
2017-06-30 19:34:23 +02:00
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
2017-06-29 21:43:12 +02:00
|
|
|
const (
|
2017-06-28 23:13:56 +02:00
|
|
|
// Environment variables
|
2017-06-30 03:07:31 +02:00
|
|
|
envCONFIGUREONLY = "GLLVM_CONFIGURE_ONLY"
|
2017-06-30 03:06:31 +02:00
|
|
|
envBCSTOREPATH = "GLLVM_BC_STORE"
|
2017-06-22 21:14:00 +02:00
|
|
|
|
2017-06-28 23:13:56 +02:00
|
|
|
// Gllvm functioning (once we have it working we can change the W to G; but for the time being leave it so that extract-bc works)
|
2017-06-30 03:06:31 +02:00
|
|
|
elfSECTIONNAME = ".llvm_bc"
|
|
|
|
darwinSEGMENTNAME = "__WLLVM"
|
|
|
|
darwinSECTIONNAME = "__llvm_bc"
|
2017-06-28 15:33:20 +02:00
|
|
|
)
|
|
|
|
|
2017-06-30 19:34:23 +02:00
|
|
|
var LLVMToolChainBinDir = ""
|
|
|
|
var LLVMCCName = ""
|
|
|
|
var LLVMCXXName = ""
|
2017-06-30 19:41:27 +02:00
|
|
|
var LLVMARName = ""
|
|
|
|
var LLVMLINKName = ""
|
2017-06-30 19:34:23 +02:00
|
|
|
|
|
|
|
func init(){
|
|
|
|
LLVMToolChainBinDir = os.Getenv("GLLVM_TOOLS_PATH")
|
2017-06-30 19:41:27 +02:00
|
|
|
LLVMCCName = os.Getenv("GLLVM_CC_NAME")
|
|
|
|
LLVMCXXName = os.Getenv("GLLVM_CXX_NAME")
|
|
|
|
LLVMARName = os.Getenv("GLLVM_AR_NAME")
|
|
|
|
LLVMLINKName = os.Getenv("GLLVM_LINK_NAME")
|
2017-06-30 19:34:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-28 15:33:20 +02:00
|
|
|
const (
|
2017-06-28 23:13:56 +02:00
|
|
|
// File types
|
2017-06-30 03:01:03 +02:00
|
|
|
ftUNDEFINED = iota
|
2017-06-30 03:06:31 +02:00
|
|
|
ftELFEXECUTABLE
|
|
|
|
ftELFOBJECT
|
|
|
|
ftELFSHARED
|
|
|
|
ftMACHEXECUTABLE
|
|
|
|
ftMACHOBJECT
|
|
|
|
ftMACHSHARED
|
2017-06-30 03:01:03 +02:00
|
|
|
ftARCHIVE
|
2017-06-22 22:02:11 +02:00
|
|
|
)
|