Files
linux-kernel-module-cheat/build-userland-in-tree
Ciro Santilli 六四事件 法轮功 9c8f95d630 build-userland-in-tree is now a Python command
./build calls it, we did this to allow --download-dependencies to work
perfectly.
2019-05-05 00:00:00 +00:00

34 lines
736 B
Python
Executable File

#!/usr/bin/env python3
import imp
import os
import subprocess
git_root = subprocess.check_output([
'git',
'rev-parse',
'--show-toplevel',
]).decode().rstrip()
build_userland = imp.load_source(
'build_userland',
os.path.join(git_root, 'build-userland')
)
class Main(build_userland.Main):
def __init__(self):
super().__init__(
description='''\
Same as build-userland, but with pre-set defaults to build in-tree
for the native toolchain.
''',
defaults={
'gcc_which': 'host',
'has_all_packages': True,
'in_tree': True,
'target_relative_cwd': True,
}
)
if __name__ == '__main__':
Main().cli()