Repository: lucy Updated Branches: refs/heads/0.6 a1c773bae -> 4eb33a717
Kludge file location from Caller(). The behavior of Caller() is not guaranteed, and sometimes contains artifacts of optimization. Work around its unpredictability by adding another case. Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/f28a6a29 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/f28a6a29 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/f28a6a29 Branch: refs/heads/0.6 Commit: f28a6a29b8a0f44f4114103250efa73fa341b273 Parents: a1c773b Author: Marvin Humphrey <mar...@rectangular.com> Authored: Wed Feb 14 18:54:04 2018 -0800 Committer: Marvin Humphrey <mar...@rectangular.com> Committed: Wed Feb 14 19:04:05 2018 -0800 ---------------------------------------------------------------------- go/build.go | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/f28a6a29/go/build.go ---------------------------------------------------------------------- diff --git a/go/build.go b/go/build.go index b751ba5..11c25d8 100644 --- a/go/build.go +++ b/go/build.go @@ -42,6 +42,9 @@ var installedLibPath string func init() { _, buildGO, _, _ = runtime.Caller(1) + if buildGO == "<autogenerated>" { + _, buildGO, _, _ = runtime.Caller(0) + } buildDir = path.Dir(buildGO) hostSrcDir = path.Join(buildDir, "../c/src") configGO = path.Join(buildDir, "lucy", "config.go")