diff options
Diffstat (limited to 'yocto-poky/bitbake/lib/bb/methodpool.py')
-rw-r--r-- | yocto-poky/bitbake/lib/bb/methodpool.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/yocto-poky/bitbake/lib/bb/methodpool.py b/yocto-poky/bitbake/lib/bb/methodpool.py index bf2e9f554..49aed3338 100644 --- a/yocto-poky/bitbake/lib/bb/methodpool.py +++ b/yocto-poky/bitbake/lib/bb/methodpool.py @@ -19,11 +19,22 @@ from bb.utils import better_compile, better_exec -def insert_method(modulename, code, fn): +def insert_method(modulename, code, fn, lineno): """ Add code of a module should be added. The methods will be simply added, no checking will be done """ - comp = better_compile(code, modulename, fn ) + comp = better_compile(code, modulename, fn, lineno=lineno) better_exec(comp, None, code, fn) +compilecache = {} + +def compile_cache(code): + h = hash(code) + if h in compilecache: + return compilecache[h] + return None + +def compile_cache_add(code, compileobj): + h = hash(code) + compilecache[h] = compileobj |