Repository: lucy
Updated Branches:
  refs/heads/master 4c6d5a41f -> 0635ca081


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/0b84711b
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/0b84711b
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/0b84711b

Branch: refs/heads/master
Commit: 0b84711bbe9c04dea37f1daaadd42de0a8f63f17
Parents: 4c6d5a4
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:08:07 2018 -0800

----------------------------------------------------------------------
 go/build.go | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/0b84711b/go/build.go
----------------------------------------------------------------------
diff --git a/go/build.go b/go/build.go
index 095efb2..03935fc 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")

Reply via email to