test: support -ldflags for "rundir" tests, new -P option
For "rundir" tests, allow users to add in linker flags as well as compiler flags, e.g. // rundir -m -ldflags -w The directive above will pass "-m" to the compiler on each package compilation and "-w" to the linker for the final link. In addition, if "-P" is specified with 'rundir', then for each compile pass in "-p <X>" to set the packagepath explicitly, which is closer to how the compiler is run by 'go build'. Change-Id: I04720011a89d1bd8dcb4f2ccb4af1d74f6a01da1 Reviewed-on: https://go-review.googlesource.com/c/go/+/168977Reviewed-by: Cherry Zhang <cherryyz@google.com>
Showing
Please register or sign in to comment