waf: move SRCROOT env variable setting to common Board class

This commit is contained in:
bugobliterator 2021-08-24 13:50:10 +05:30 committed by Andrew Tridgell
parent 47a3298236
commit 5940cfac8a
1 changed files with 3 additions and 4 deletions

View File

@ -43,6 +43,9 @@ class Board:
cfg.load('cxx_checks')
env = waflib.ConfigSet.ConfigSet()
def srcpath(path):
return cfg.srcnode.make_node(path).abspath()
env.SRCROOT = srcpath('')
self.configure_env(cfg, env)
# Setup scripting, had to defer this to allow checking board size
@ -592,10 +595,6 @@ class sitl(Board):
env.CXXFLAGS += [
'-fno-slp-vectorize' # compiler bug when trying to use SLP
]
def srcpath(path):
return cfg.srcnode.make_node(path).abspath()
env.SRCROOT = srcpath('')
class sitl_periph_gps(sitl):
def configure_env(self, cfg, env):