blob: d6c29fe2af15e4267f1c9ea7c85e2249b5745d86 [file] [log] [blame]
package launch
import (
"github.com/bazelbuild/rules_go/go/runfiles"
)
var (
// These are filled by bazel at linking time with the canonical path of
// their corresponding file. Inside the init function we resolve it
// with the rules_go runfiles package to the real path.
xSwtpmPath string
xSwtpmSetupPath string
xSwtpmLocalCAPath string
xSwtpmCertPath string
xCerttoolPath string
xMetroctlPath string
xOvmfCodePath string
xOvmfVarsPath string
xKernelPath string
xInitramfsPath string
xNodeImagePath string
)
func init() {
var err error
for _, path := range []*string{
&xSwtpmPath, &xSwtpmSetupPath, &xSwtpmLocalCAPath,
&xSwtpmCertPath, &xCerttoolPath, &xMetroctlPath,
&xOvmfCodePath, &xOvmfVarsPath, &xKernelPath,
&xInitramfsPath, &xNodeImagePath,
} {
*path, err = runfiles.Rlocation(*path)
if err != nil {
panic(err)
}
}
}