proc/native,Makefile: allow compiling on macOS without native backend

On macOS 10.14 Apple changed the command line tools so that system
headers now need to be manually installed.

Instead of adding one extra install step to the install procedure add a
build tag to allow compilation of delve without the native backend on
macOS. By default (i.e. when using `go get`) this is how delve will be
compiled on macOS, the make script is changed to enable compiling the
native backend if the required dependencies have been installed.

Insure that both configuration still build correctly on Travis CI and
change the documentation to describe how to compile the native backend
and that it isn't normally needed.

Fixes #1359
This commit is contained in:
aarzilli
2018-10-01 10:19:06 +02:00
committed by Derek Parker
parent 79a0e216ab
commit 910f90c3c8
19 changed files with 238 additions and 39 deletions

View File

@ -29,12 +29,7 @@ var testBackend string
func TestMain(m *testing.M) {
flag.StringVar(&testBackend, "backend", "", "selects backend")
flag.Parse()
if testBackend == "" {
testBackend = os.Getenv("PROCTEST")
if testBackend == "" {
testBackend = "native"
}
}
test.DefaultTestBackend(&testBackend)
os.Exit(test.RunTestsWithFixtures(m))
}