From 70883e356e697df5fa114d1d48aaacb2d4c82a62 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Thu, 18 Feb 2021 10:39:32 -0500 Subject: [PATCH 1/5] shared/compiler: add some debug logs --- shared/compiler.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shared/compiler.go b/shared/compiler.go index 8c5fcc3..a1da3a5 100644 --- a/shared/compiler.go +++ b/shared/compiler.go @@ -119,6 +119,7 @@ func buildAndAttachBitcode(compilerExecName string, pr ParserResult, bcObjLinks for i, srcFile := range pr.InputFiles { objFile, bcFile := getArtifactNames(pr, i, hidden) if hidden { + LogDebug("not compile only; building object files") buildObjectFile(compilerExecName, pr, srcFile, objFile) *newObjectFiles = append(*newObjectFiles, objFile) } @@ -271,6 +272,7 @@ func compileTimeLinkFiles(compilerExecName string, pr ParserResult, objFiles []s func buildObjectFile(compilerExecName string, pr ParserResult, srcFile string, objFile string) (success bool) { args := pr.CompileArgs[:] args = append(args, srcFile, "-c", "-o", objFile) + LogDebug("buildObjectFile: %v", args) success, err := execCmd(compilerExecName, args, "") if !success { LogError("Failed to build object file for %s because: %v\n", srcFile, err) From c302d052827a0f01536502ea1d739d827348dadb Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Thu, 18 Feb 2021 11:25:11 -0500 Subject: [PATCH 2/5] shared/parser: continued debugging --- shared/parser.go | 1 + 1 file changed, 1 insertion(+) diff --git a/shared/parser.go b/shared/parser.go index 0ca66bd..213a8d2 100644 --- a/shared/parser.go +++ b/shared/parser.go @@ -541,6 +541,7 @@ func (pr *ParserResult) verboseFlagCallback(_ string, _ []string) { } func (pr *ParserResult) compileOnlyCallback(_ string, _ []string) { + LogDebug("compileOnlyCallback") pr.IsCompileOnly = true } From 58e909d35e01377f642eb7e8e1267d49e8384005 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Thu, 18 Feb 2021 11:28:56 -0500 Subject: [PATCH 3/5] shared/parser: temporarily disable some callbacks --- shared/parser.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/parser.go b/shared/parser.go index 213a8d2..92a553a 100644 --- a/shared/parser.go +++ b/shared/parser.go @@ -177,8 +177,8 @@ func Parse(argList []string) ParserResult { "--version": {0, pr.compileOnlyCallback}, "-v": {0, pr.compileOnlyCallback}, - "-w": {0, pr.compileOnlyCallback}, - "-W": {0, pr.compileOnlyCallback}, + // "-w": {0, pr.compileOnlyCallback}, + // "-W": {0, pr.compileOnlyCallback}, "-emit-llvm": {0, pr.emitLLVMCallback}, "-flto": {0, pr.linkTimeOptimizationCallback}, From 2607b2c9f026a197aa96f0308ed8694d8893533b Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Thu, 18 Feb 2021 11:41:46 -0500 Subject: [PATCH 4/5] shared/parser: use compileUnaryCallback --- shared/parser.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/parser.go b/shared/parser.go index 92a553a..212e250 100644 --- a/shared/parser.go +++ b/shared/parser.go @@ -177,8 +177,8 @@ func Parse(argList []string) ParserResult { "--version": {0, pr.compileOnlyCallback}, "-v": {0, pr.compileOnlyCallback}, - // "-w": {0, pr.compileOnlyCallback}, - // "-W": {0, pr.compileOnlyCallback}, + "-w": {0, pr.compileUnaryCallback}, + "-W": {0, pr.compileUnaryCallback}, "-emit-llvm": {0, pr.emitLLVMCallback}, "-flto": {0, pr.linkTimeOptimizationCallback}, From 285070d09ae4bafa8d4fd6df46b7c0f6c5b79dd0 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Thu, 18 Feb 2021 11:45:12 -0500 Subject: [PATCH 5/5] shared: drop some debug logs --- shared/compiler.go | 1 - shared/parser.go | 1 - 2 files changed, 2 deletions(-) diff --git a/shared/compiler.go b/shared/compiler.go index a1da3a5..cd01162 100644 --- a/shared/compiler.go +++ b/shared/compiler.go @@ -119,7 +119,6 @@ func buildAndAttachBitcode(compilerExecName string, pr ParserResult, bcObjLinks for i, srcFile := range pr.InputFiles { objFile, bcFile := getArtifactNames(pr, i, hidden) if hidden { - LogDebug("not compile only; building object files") buildObjectFile(compilerExecName, pr, srcFile, objFile) *newObjectFiles = append(*newObjectFiles, objFile) } diff --git a/shared/parser.go b/shared/parser.go index 212e250..e1383a6 100644 --- a/shared/parser.go +++ b/shared/parser.go @@ -541,7 +541,6 @@ func (pr *ParserResult) verboseFlagCallback(_ string, _ []string) { } func (pr *ParserResult) compileOnlyCallback(_ string, _ []string) { - LogDebug("compileOnlyCallback") pr.IsCompileOnly = true }