Skip to content

Commit d853576

Browse files
committed
Tweaks for v1.2.8
1 parent 83f0074 commit d853576

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

cmd/gparse/main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,6 @@ func main() {
4545
args = args[1:]
4646
parsed := shared.Parse(args)
4747
// Print out the result
48-
fmt.Printf("Parsed: %v", &parsed)
48+
fmt.Printf("parsed: %v\n", &parsed)
49+
fmt.Printf("parsed.SkipBitcodeGeneration() = %v\n", parsed.SkipBitcodeGeneration())
4950
}

shared/compiler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func Compile(args []string, compiler string) (exitCode int) {
6767
LogDebug("Compile using parsed arguments:%v\n", &pr)
6868

6969
// If configure only, emit-llvm, flto, or print only are set, just execute the compiler
70-
if pr.skipBitcodeGeneration() {
70+
if pr.SkipBitcodeGeneration() {
7171
wg.Add(1)
7272
go execCompile(compilerExecName, pr, &wg, &ok)
7373
wg.Wait()

shared/constants.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ package shared
5454
//
5555
// 1.2.7 August 4 2020 William Woodruff's (@woodruffw) tweaks to the get-bc command (a strict mode).
5656
//
57-
// 1.2.8 October 12 2020 Wensheng Tang's (@legendtang) requests and fixes to the -flto issues.
57+
// 1.2.8 October 13 2020 Wensheng Tang's (@legendtang) requests and fixes to the -flto issues (issue #39).
58+
// Added support for the LTO_LINKING_FLAGS environment variable.
5859

5960
const gllvmVersion = "1.2.8"
60-
const gllvmReleaseDate = "October 12 2020"
61+
const gllvmReleaseDate = "October 13 2020"
6162

6263
const osDARWIN = "darwin"
6364
const osLINUX = "linux"

shared/parser.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ type argPattern struct {
112112
finfo flagInfo
113113
}
114114

115-
func (pr *ParserResult) skipBitcodeGeneration() bool {
115+
//SkipBitcodeGeneration indicates whether or not we should generate bitcode for these command line options.
116+
func (pr *ParserResult) SkipBitcodeGeneration() bool {
116117
reason := "No particular reason"
117118
retval := false
118119
squark := LogDebug

tests/parsing_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -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
1818
func plto(input string, t *testing.T) {
1919
cmds := strings.Fields(input)
2020
parsed := shared.Parse(cmds)
21+
shared.LogInfo("\n<parsed>%v</parsed>", &parsed)
2122
if !parsed.IsLTO {
2223
t.Errorf("Parsing of %v FAILED %v (not LTO)\n", input, parsed)
2324
}
@@ -26,6 +27,7 @@ func plto(input string, t *testing.T) {
2627
func pl(input string, t *testing.T, expected int) {
2728
cmds := strings.Fields(input)
2829
parsed := shared.Parse(cmds)
30+
shared.LogInfo("\n<parsed>%v</parsed>", &parsed)
2931
if expected != len(parsed.LinkArgs) {
3032
t.Errorf("Linking args %v of length %v NOT the expected length %v\n", parsed.LinkArgs, len(parsed.LinkArgs), expected)
3133
}

0 commit comments

Comments
 (0)