aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-12-17 23:04:01 -0500
committerJack Lloyd <[email protected]>2016-12-18 10:24:50 -0500
commit6362803981df463225ba20cf5c82d477c11bc95c (patch)
treef3292c96f2977975bb9535a36869583412bf1325 /configure.py
parent5006e178ba46dbb977c9e7363b770bc758782d4b (diff)
Add new module sanity check to configure.py
[ci skip]
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.py b/configure.py
index d690f4b98..c5e7fcd06 100755
--- a/configure.py
+++ b/configure.py
@@ -700,6 +700,17 @@ class ModuleInfo(object):
intersect_check('public', self.header_public, 'external', self.header_external)
intersect_check('external', self.header_external, 'internal', self.header_internal)
+ def cross_check(self, arch_info, os_info, cc_info):
+ for os in self.os:
+ if os not in os_info:
+ raise Exception('Module %s mentions unknown OS %s' % (self.infofile, os))
+ for cc in self.cc:
+ if cc not in cc_info:
+ raise Exception('Module %s mentions unknown compiler %s' % (self.infofile, cc))
+ for arch in self.arch:
+ if arch not in arch_info:
+ raise Exception('Module %s mentions unknown arch %s' % (self.infofile, arch))
+
def sources(self):
return self.source
@@ -2099,6 +2110,9 @@ def main(argv = None):
info_os = load_build_data('OS info', 'os', OsInfo)
info_cc = load_build_data('compiler info', 'cc', CompilerInfo)
+ for mod in modules.values():
+ mod.cross_check(info_arch, info_os, info_cc)
+
module_policies = load_build_data('module policy', 'policy', ModulePolicyInfo)
for policy in module_policies.values():