Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be37decab5 |
1 changed files with 19 additions and 10 deletions
|
|
@ -1,4 +1,4 @@
|
|||
From 1f9597d3ca2e7d3497f9d28046bbae5522742306 Mon Sep 17 00:00:00 2001
|
||||
From d8dea926a56c841cba31d13d51f692817157eeb4 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Parker <deparker@redhat.com>
|
||||
Date: Wed, 20 Feb 2019 13:26:18 -0800
|
||||
Subject: [PATCH] pkg/proc: Disable default compression on DWZ test
|
||||
|
|
@ -14,23 +14,32 @@ a Fedora VM I build and the binary results in compressed DWARF sections.
|
|||
|
||||
Adding this flag will make this test more consistent overall.
|
||||
---
|
||||
pkg/proc/test/support.go | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
pkg/proc/test/support.go | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pkg/proc/test/support.go b/pkg/proc/test/support.go
|
||||
index 9e09da861ec53657bfa0fb9cf76620a4fcd485dc..ccfc1c4939ef6e9c8abbbc67f4fbeaaf0e623de1 100644
|
||||
index 9e09da86..107fc695 100644
|
||||
--- a/pkg/proc/test/support.go
|
||||
+++ b/pkg/proc/test/support.go
|
||||
@@ -125,6 +125,9 @@ func BuildFixture(name string, flags BuildFlags) Fixture {
|
||||
@@ -103,7 +103,8 @@ func BuildFixture(name string, flags BuildFlags) Fixture {
|
||||
tmpfile := filepath.Join(os.TempDir(), fmt.Sprintf("%s.%s", name, hex.EncodeToString(r)))
|
||||
|
||||
buildFlags := []string{"build"}
|
||||
- if ver, _ := goversion.Parse(runtime.Version()); runtime.GOOS == "windows" && ver.Major > 0 && !ver.AfterOrEqual(goversion.GoVersion{1, 9, -1, 0, 0, ""}) {
|
||||
+ var ver goversion.GoVersion
|
||||
+ if ver, _ = goversion.Parse(runtime.Version()); runtime.GOOS == "windows" && ver.Major > 0 && !ver.AfterOrEqual(goversion.GoVersion{1, 9, -1, 0, 0, ""}) {
|
||||
// Work-around for https://github.com/golang/go/issues/13154
|
||||
buildFlags = append(buildFlags, "-ldflags=-linkmode internal")
|
||||
}
|
||||
@@ -125,6 +126,11 @@ func BuildFixture(name string, flags BuildFlags) Fixture {
|
||||
if flags&BuildModePIE != 0 {
|
||||
buildFlags = append(buildFlags, "-buildmode=pie")
|
||||
}
|
||||
+ if flags&EnableDWZCompression != 0 {
|
||||
+ buildFlags = append(buildFlags, "-ldflags=-compressdwarf=false")
|
||||
+ if ver.AfterOrEqual(goversion.GoVersion{1, 11, -1, 0, 0, ""}) {
|
||||
+ if flags&EnableDWZCompression != 0 {
|
||||
+ buildFlags = append(buildFlags, "-ldflags=-compressdwarf=false")
|
||||
+ }
|
||||
+ }
|
||||
if path != "" {
|
||||
buildFlags = append(buildFlags, name+".go")
|
||||
}
|
||||
--
|
||||
2.16.5
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue