mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
userland: make --host awesome
This commit is contained in:
@@ -17,6 +17,15 @@ class UserlandComponent(common.Component):
|
||||
help='''\
|
||||
Indicate that a given package is present in the root filesystem, which
|
||||
allows us to build examples that rely on it.
|
||||
''',
|
||||
)
|
||||
parser.add_argument(
|
||||
'--host',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='''\
|
||||
Build the userland programs for the host instead of guest.
|
||||
Use the host packaged cross toolchain.
|
||||
''',
|
||||
)
|
||||
parser.add_argument(
|
||||
@@ -38,7 +47,10 @@ has the OpenBLAS libraries and headers installed.
|
||||
def do_build(self, args):
|
||||
build_dir = self.get_build_dir(args)
|
||||
os.makedirs(build_dir, exist_ok=True)
|
||||
allowed_toolchains = ['buildroot']
|
||||
if args.host:
|
||||
allowed_toolchains = ['host']
|
||||
else:
|
||||
allowed_toolchains = ['buildroot']
|
||||
cc = common.get_toolchain_tool('gcc', allowed_toolchains=allowed_toolchains)
|
||||
cxx = common.get_toolchain_tool('g++', allowed_toolchains=allowed_toolchains)
|
||||
common.run_cmd(
|
||||
|
||||
Reference in New Issue
Block a user