Tweaks for v1.2.8

This commit is contained in:
Ian A. Mason 2020-10-13 08:46:41 -07:00
parent 83f0074ba9
commit d853576c95
5 changed files with 10 additions and 5 deletions

View File

@ -45,5 +45,6 @@ func main() {
args = args[1:]
parsed := shared.Parse(args)
// Print out the result
fmt.Printf("Parsed: %v", &parsed)
fmt.Printf("parsed: %v\n", &parsed)
fmt.Printf("parsed.SkipBitcodeGeneration() = %v\n", parsed.SkipBitcodeGeneration())
}

View File

@ -67,7 +67,7 @@ func Compile(args []string, compiler string) (exitCode int) {
LogDebug("Compile using parsed arguments:%v\n", &pr)
// If configure only, emit-llvm, flto, or print only are set, just execute the compiler
if pr.skipBitcodeGeneration() {
if pr.SkipBitcodeGeneration() {
wg.Add(1)
go execCompile(compilerExecName, pr, &wg, &ok)
wg.Wait()

View File

@ -54,10 +54,11 @@ package shared
//
// 1.2.7 August 4 2020 William Woodruff's (@woodruffw) tweaks to the get-bc command (a strict mode).
//
// 1.2.8 October 12 2020 Wensheng Tang's (@legendtang) requests and fixes to the -flto issues.
// 1.2.8 October 13 2020 Wensheng Tang's (@legendtang) requests and fixes to the -flto issues (issue #39).
// Added support for the LTO_LINKING_FLAGS environment variable.
const gllvmVersion = "1.2.8"
const gllvmReleaseDate = "October 12 2020"
const gllvmReleaseDate = "October 13 2020"
const osDARWIN = "darwin"
const osLINUX = "linux"

View File

@ -112,7 +112,8 @@ type argPattern struct {
finfo flagInfo
}
func (pr *ParserResult) skipBitcodeGeneration() bool {
//SkipBitcodeGeneration indicates whether or not we should generate bitcode for these command line options.
func (pr *ParserResult) SkipBitcodeGeneration() bool {
reason := "No particular reason"
retval := false
squark := LogDebug

View File

@ -18,6 +18,7 @@ const input3 = `1.c 2.c 3.c 4.c 5.c -Wl,--start-group 7.o 8.o 9.o -Wl,--end-grou
func plto(input string, t *testing.T) {
cmds := strings.Fields(input)
parsed := shared.Parse(cmds)
shared.LogInfo("\n<parsed>%v</parsed>", &parsed)
if !parsed.IsLTO {
t.Errorf("Parsing of %v FAILED %v (not LTO)\n", input, parsed)
}
@ -26,6 +27,7 @@ func plto(input string, t *testing.T) {
func pl(input string, t *testing.T, expected int) {
cmds := strings.Fields(input)
parsed := shared.Parse(cmds)
shared.LogInfo("\n<parsed>%v</parsed>", &parsed)
if expected != len(parsed.LinkArgs) {
t.Errorf("Linking args %v of length %v NOT the expected length %v\n", parsed.LinkArgs, len(parsed.LinkArgs), expected)
}