Skip to content

Commit

Permalink
scripts/build-local.py: Only require runtime when using versioned too…
Browse files Browse the repository at this point in the history
…lchains

tuxmake allows overriding of internal variables, so toolchains on disk
can be used instead of the versioned toolchain containers. This allows
users to use the LLVM=.../bin/ idiom merged in 5.18 or CROSS_COMPILE=...
to use kernel.org's toolchains to build kernels using tuxmake and yaml
files.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
  • Loading branch information
nathanchance authored and nickdesaulniers committed Jul 11, 2023
1 parent bfc4bb4 commit 30cfddf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/build-local.py
Expand Up @@ -73,9 +73,7 @@
elif shutil.which('docker'):
runtime = 'docker'
else:
raise RuntimeError(
"tuxmake requires either podman or docker for versioned toolchains but neither could be found on your system!"
)
runtime = None

# Combine all jobs into one object for easy iteration
jobs = {}
Expand Down Expand Up @@ -110,6 +108,11 @@
target_arch = build['target_arch']
toolchain = build['toolchain']

if '-' in toolchain and not runtime:
raise RuntimeError(
f"tuxmake requires either podman or docker to use versioned toolchains ('{toolchain}') but neither could be found on your system!"
)

cfg_str = '+'.join(kconfig) if isinstance(kconfig, list) else kconfig
print(f"I: Building {target_arch} {cfg_str} ({toolchain})... ",
end='\n' if args.verbose else '',
Expand Down

0 comments on commit 30cfddf

Please sign in to comment.