bpf: use PwdPrefix() helper

relPwd is only set if runtime.GOOS != "darwin" but is used
unconditionally. Instead, unconditionally set relPwd using the
cc.PwdPrefix() helper.

Bug: 238165437
Test: m timeInState.o
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: I5294bb6ea95dad60fbf64e9d958e1f1b32a02a48
This commit is contained in:
Connor O'Brien
2022-11-10 13:58:48 -08:00
parent 877336cc3a
commit 6a288bc799

View File

@@ -24,6 +24,7 @@ import (
"android/soong/android"
"android/soong/bazel"
"android/soong/bazel/cquery"
"android/soong/cc"
"github.com/google/blueprint"
"github.com/google/blueprint/proptools"
@@ -32,9 +33,7 @@ import (
func init() {
registerBpfBuildComponents(android.InitRegistrationContext)
pctx.Import("android/soong/cc/config")
if runtime.GOOS != "darwin" {
pctx.StaticVariable("relPwd", "PWD=/proc/self/cwd")
}
pctx.StaticVariable("relPwd", cc.PwdPrefix())
}
var (