mirror of
https://github.com/danog/gllvm.git
synced 2024-11-26 19:24:40 +01:00
Futzing insidee the vagrant box.
This commit is contained in:
parent
3c7ad06857
commit
3a57e247a0
@ -9,7 +9,7 @@ go install github.com/SRI-CSL/gllvm/cmd/...
|
||||
|
||||
To format for the badge:
|
||||
|
||||
gofmt -s -w shared/*.go cmd/*/*.go
|
||||
gofmt -s -w shared/*.go tests/*.go cmd/*/*.go
|
||||
|
||||
|
||||
For linting:
|
||||
|
@ -56,7 +56,9 @@ type bitcodeToObjectLink struct {
|
||||
//Compile wraps a call to the compiler with the given args.
|
||||
func Compile(args []string, compiler string) (exitCode int) {
|
||||
|
||||
if REPLAY_MODE { Record(args, compiler) }
|
||||
if REPLAY_MODE {
|
||||
Record(args, compiler)
|
||||
}
|
||||
|
||||
exitCode = 0
|
||||
//in the configureOnly case we have to know the exit code of the compile
|
||||
|
@ -152,9 +152,9 @@ func resolveTool(defaultPath string, envPath string, usrPath string) (path strin
|
||||
|
||||
func parseSwitches() (ea extractionArgs) {
|
||||
ea = extractionArgs{
|
||||
LinkerName: "llvm-link",
|
||||
LinkerName: "llvm-link",
|
||||
LlvmArchiverName: "llvm-ar",
|
||||
ArchiverName: "ar",
|
||||
ArchiverName: "ar",
|
||||
}
|
||||
|
||||
verbosePtr := flag.Bool("v", false, "verbose mode")
|
||||
@ -185,7 +185,7 @@ func parseSwitches() (ea extractionArgs) {
|
||||
ea.BuildBitcodeModule = *buildBitcodeModule
|
||||
ea.LinkArgSize = *linkArgSizePtr
|
||||
ea.KeepTemp = *keepTempPtr
|
||||
|
||||
|
||||
if len(*archiverNamePtr) > 0 {
|
||||
ea.ArchiverName = *archiverNamePtr
|
||||
}
|
||||
|
@ -133,42 +133,42 @@ func parse(argList []string) parserResult {
|
||||
"-nostdlibinc": {0, pr.compileUnaryCallback},
|
||||
|
||||
"-mno-omit-leaf-frame-pointer": {0, pr.compileUnaryCallback},
|
||||
"-maes": {0, pr.compileUnaryCallback},
|
||||
"-mno-aes": {0, pr.compileUnaryCallback},
|
||||
"-mavx": {0, pr.compileUnaryCallback},
|
||||
"-mno-avx": {0, pr.compileUnaryCallback},
|
||||
"-mavx2": {0, pr.compileUnaryCallback},
|
||||
"-mno-avx2": {0, pr.compileUnaryCallback},
|
||||
"-mno-red-zone": {0, pr.compileUnaryCallback},
|
||||
"-mmmx": {0, pr.compileUnaryCallback},
|
||||
"-mno-mmx": {0, pr.compileUnaryCallback},
|
||||
"-mno-global-merge": {0, pr.compileUnaryCallback}, //iam: linux kernel stuff
|
||||
"-mno-80387": {0, pr.compileUnaryCallback}, //iam: linux kernel stuff
|
||||
"-msse": {0, pr.compileUnaryCallback},
|
||||
"-mno-sse": {0, pr.compileUnaryCallback},
|
||||
"-msse2": {0, pr.compileUnaryCallback},
|
||||
"-mno-sse2": {0, pr.compileUnaryCallback},
|
||||
"-msse3": {0, pr.compileUnaryCallback},
|
||||
"-mno-sse3": {0, pr.compileUnaryCallback},
|
||||
"-mssse3": {0, pr.compileUnaryCallback},
|
||||
"-mno-ssse3": {0, pr.compileUnaryCallback},
|
||||
"-msse4": {0, pr.compileUnaryCallback},
|
||||
"-mno-sse4": {0, pr.compileUnaryCallback},
|
||||
"-msse4.1": {0, pr.compileUnaryCallback},
|
||||
"-mno-sse4.1": {0, pr.compileUnaryCallback},
|
||||
"-msse4.2": {0, pr.compileUnaryCallback},
|
||||
"-mno-sse4.2": {0, pr.compileUnaryCallback},
|
||||
"-msoft-float": {0, pr.compileUnaryCallback},
|
||||
"-m3dnow": {0, pr.compileUnaryCallback},
|
||||
"-mno-3dnow": {0, pr.compileUnaryCallback},
|
||||
"-m16": {0, pr.compileLinkUnaryCallback}, //iam: linux kernel stuff
|
||||
"-m32": {0, pr.compileLinkUnaryCallback},
|
||||
"-m64": {0, pr.compileLinkUnaryCallback},
|
||||
"-mstackrealign": {0, pr.compileUnaryCallback},
|
||||
"-mretpoline-external-thunk": {0, pr.compileUnaryCallback}, //iam: linux kernel stuff
|
||||
"-mno-fp-ret-in-387": {0, pr.compileUnaryCallback}, //iam: linux kernel stuff
|
||||
"-mskip-rax-setup": {0, pr.compileUnaryCallback}, //iam: linux kernel stuff
|
||||
"-mindirect-branch-register": {0, pr.compileUnaryCallback}, //iam: linux kernel stuff
|
||||
"-maes": {0, pr.compileUnaryCallback},
|
||||
"-mno-aes": {0, pr.compileUnaryCallback},
|
||||
"-mavx": {0, pr.compileUnaryCallback},
|
||||
"-mno-avx": {0, pr.compileUnaryCallback},
|
||||
"-mavx2": {0, pr.compileUnaryCallback},
|
||||
"-mno-avx2": {0, pr.compileUnaryCallback},
|
||||
"-mno-red-zone": {0, pr.compileUnaryCallback},
|
||||
"-mmmx": {0, pr.compileUnaryCallback},
|
||||
"-mno-mmx": {0, pr.compileUnaryCallback},
|
||||
"-mno-global-merge": {0, pr.compileUnaryCallback}, //iam: linux kernel stuff
|
||||
"-mno-80387": {0, pr.compileUnaryCallback}, //iam: linux kernel stuff
|
||||
"-msse": {0, pr.compileUnaryCallback},
|
||||
"-mno-sse": {0, pr.compileUnaryCallback},
|
||||
"-msse2": {0, pr.compileUnaryCallback},
|
||||
"-mno-sse2": {0, pr.compileUnaryCallback},
|
||||
"-msse3": {0, pr.compileUnaryCallback},
|
||||
"-mno-sse3": {0, pr.compileUnaryCallback},
|
||||
"-mssse3": {0, pr.compileUnaryCallback},
|
||||
"-mno-ssse3": {0, pr.compileUnaryCallback},
|
||||
"-msse4": {0, pr.compileUnaryCallback},
|
||||
"-mno-sse4": {0, pr.compileUnaryCallback},
|
||||
"-msse4.1": {0, pr.compileUnaryCallback},
|
||||
"-mno-sse4.1": {0, pr.compileUnaryCallback},
|
||||
"-msse4.2": {0, pr.compileUnaryCallback},
|
||||
"-mno-sse4.2": {0, pr.compileUnaryCallback},
|
||||
"-msoft-float": {0, pr.compileUnaryCallback},
|
||||
"-m3dnow": {0, pr.compileUnaryCallback},
|
||||
"-mno-3dnow": {0, pr.compileUnaryCallback},
|
||||
"-m16": {0, pr.compileLinkUnaryCallback}, //iam: linux kernel stuff
|
||||
"-m32": {0, pr.compileLinkUnaryCallback},
|
||||
"-m64": {0, pr.compileLinkUnaryCallback},
|
||||
"-mstackrealign": {0, pr.compileUnaryCallback},
|
||||
"-mretpoline-external-thunk": {0, pr.compileUnaryCallback}, //iam: linux kernel stuff
|
||||
"-mno-fp-ret-in-387": {0, pr.compileUnaryCallback}, //iam: linux kernel stuff
|
||||
"-mskip-rax-setup": {0, pr.compileUnaryCallback}, //iam: linux kernel stuff
|
||||
"-mindirect-branch-register": {0, pr.compileUnaryCallback}, //iam: linux kernel stuff
|
||||
|
||||
"-A": {1, pr.compileBinaryCallback},
|
||||
"-D": {1, pr.compileBinaryCallback},
|
||||
|
@ -2,8 +2,8 @@ package shared
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"os"
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -117,7 +117,7 @@ func Replay(path string) (ok bool) {
|
||||
|
||||
farewell:
|
||||
os.Chdir(cwd)
|
||||
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,13 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/SRI-CSL/gllvm/shared"
|
||||
"testing"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
|
||||
func Test_basic(t *testing.T) {
|
||||
args := []string{ "../data/helloworld.c", "-o", "../data/hello" }
|
||||
func Test_basic(t *testing.T) {
|
||||
args := []string{"../data/helloworld.c", "-o", "../data/hello"}
|
||||
|
||||
exitCode := shared.Compile(args, "clang")
|
||||
|
||||
|
@ -1,13 +1,12 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/SRI-CSL/gllvm/shared"
|
||||
"testing"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
|
||||
func Test_replay_thttpd(t *testing.T) {
|
||||
func Test_replay_thttpd(t *testing.T) {
|
||||
arg := "../data/thttpd_replay.log"
|
||||
|
||||
ok := shared.Replay(arg)
|
||||
@ -19,7 +18,7 @@ func Test_replay_thttpd(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func Test_replay_nodejs(t *testing.T) {
|
||||
func Test_replay_nodejs(t *testing.T) {
|
||||
arg := "../data/nodejs_replay.log"
|
||||
|
||||
ok := shared.Replay(arg)
|
||||
|
Loading…
Reference in New Issue
Block a user