phase1: remove GetCwd()
authorThibaut VARÈNE <hacks@slashdirt.org>
Thu, 20 Oct 2022 09:33:10 +0000 (11:33 +0200)
committerPetr Štetiar <ynezz@true.cz>
Mon, 15 May 2023 15:36:01 +0000 (17:36 +0200)
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
phase1/master.cfg

index 38df7f533ae8683632d09ecdf1b8bde3eb3f58be..7698f00533279d0dbb9c125e19657d4dc75f7e1a 100644 (file)
@@ -475,15 +475,6 @@ def GetCXX(props):
        else:
                return "g++"
 
-@properties.renderer
-def GetCwd(props):
-       if props.hasProperty("builddir"):
-               return props["builddir"]
-       elif props.hasProperty("workdir"):
-               return props["workdir"]
-       else:
-               return "/"
-
 @properties.renderer
 def GetCCache(props):
        if props.hasProperty("ccache_command") and "ccache" in props["ccache_command"]:
@@ -506,8 +497,8 @@ def MakeEnv(overrides=None, tryccache=False):
                'CCXX': Interpolate("%(kw:cxx)s", cxx=GetCXX),
        }
        if tryccache:
-               env['CC'] = Interpolate("%(kw:cwd)s/ccache_cc.sh", cwd=GetCwd)
-               env['CXX'] = Interpolate("%(kw:cwd)s/ccache_cxx.sh", cwd=GetCwd)
+               env['CC'] = Interpolate("%(prop:builddir)s/ccache_cc.sh")
+               env['CXX'] = Interpolate("%(prop:builddir)s/ccache_cxx.sh")
                env['CCACHE'] = Interpolate("%(kw:ccache)s", ccache=GetCCache)
        else:
                env['CC'] = env['CCC']
@@ -937,7 +928,7 @@ for target in targets:
                property = "kernelversion",
                description = "Finding the effective Kernel version",
                command = "make --no-print-directory -C target/linux/ val.LINUX_VERSION val.LINUX_RELEASE val.LINUX_VERMAGIC | xargs printf '%s-%s-%s\\n'",
-               env = { 'TOPDIR': Interpolate("%(kw:cwd)s/build", cwd=GetCwd) }
+               env = { 'TOPDIR': Interpolate("%(prop:builddir)s/build") }
        ))
 
        factory.addStep(ShellCommand(