Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compilepkg: fix stored file path truncation
This fixes the issue described in cockroachdb/cockroach#64379 where the internal paths of the files don't include the `github.com/cockroachdb/cockroach` prefix. We fix this by using the rewrite syntax of `-trimpath`, e.g. `-trimpath=/sandbox/execroot=>github.com/cockroachdb/cockroach`. Figuring out the replacement part is not trivial. We use the package path and strip out the relative path of the source file directory.
- Loading branch information