From 27ff069bcb1e55770d5cd4f6c925631139840c63 Mon Sep 17 00:00:00 2001 From: "Ian A. Mason" Date: Tue, 24 Mar 2020 12:38:09 -0700 Subject: [PATCH] gofmt tweaks. --- shared/environment.go | 14 ++++---- shared/parser.go | 72 +++++++++++++++++++-------------------- tests/env_and_arg_test.go | 1 - 3 files changed, 43 insertions(+), 44 deletions(-) diff --git a/shared/environment.go b/shared/environment.go index 6e044c6..8277b10 100644 --- a/shared/environment.go +++ b/shared/environment.go @@ -101,7 +101,7 @@ const ( //wllvm uses a BINUTILS_TARGET_PREFIX, which seems less general. //iam: 03/24/2020 new feature to pass things like "-flto -fwhole-program-vtables" // to clang during the bitcode generation step - envbcgen = "LLVM_BITCODE_GENERATION_FLAGS" + envbcgen = "LLVM_BITCODE_GENERATION_FLAGS" ) func init() { @@ -126,16 +126,16 @@ func PrintEnvironment() { // also used in testing func ResetEnvironment() { LLVMToolChainBinDir = "" - LLVMCCName = "" - LLVMCXXName = "" - LLVMARName = "" - LLVMLINKName = "" - LLVMConfigureOnly = "" + LLVMCCName = "" + LLVMCXXName = "" + LLVMARName = "" + LLVMLINKName = "" + LLVMConfigureOnly = "" LLVMBitcodeStorePath = "" LLVMLoggingLevel = "" LLVMLoggingFile = "" LLVMObjcopy = "" - LLVMLd = "" + LLVMLd = "" LLVMbcGen = []string{} } diff --git a/shared/parser.go b/shared/parser.go index b14e286..765f1a4 100644 --- a/shared/parser.go +++ b/shared/parser.go @@ -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}, diff --git a/tests/env_and_arg_test.go b/tests/env_and_arg_test.go index 204732b..2a34d38 100644 --- a/tests/env_and_arg_test.go +++ b/tests/env_and_arg_test.go @@ -45,7 +45,6 @@ func Test_env_and_args(t *testing.T) { shared.PrintEnvironment() } - shared.ResetEnvironment() ea := shared.ParseSwitches(args)