diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2022-03-24 11:35:33 +0100 |
---|---|---|
committer | Martin L Roth <gaumless@tutanota.com> | 2022-05-28 05:23:21 +0000 |
commit | c2eb9e6e81d1ca1236d36ae240f67f3727a202c3 (patch) | |
tree | 9bd8b3b7f728855a2992449db5b8d1df1254fc62 /util | |
parent | 5b528bc656de4df3ec44df1ddc525ae099b7d219 (diff) |
abuild: Build with clang only when supported
This changes the behavior of '-L/--clang' to only buildtest when a
target has ARCH_SUPPORTS_CLANG set.
Change-Id: I362fcd0f795d27f13dde793a79774f08c497bd38
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63084
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@tutanota.com>
Diffstat (limited to 'util')
-rwxr-xr-x | util/abuild/abuild | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/util/abuild/abuild b/util/abuild/abuild index cc149a8a2d..2632aaa176 100755 --- a/util/abuild/abuild +++ b/util/abuild/abuild @@ -456,6 +456,14 @@ function build_config local FORCE_ENABLED_CROS=0 fi + if [ "$clang" = true ]; then + check_config "$build_dir" "clang" "CONFIG_COMPILER_LLVM_CLANG=y" + if [ $? -ne 0 ]; then + echo "${MAINBOARD} doesn't support clang, skipping." + return + fi + fi + if [ $BUILDENV_CREATED -ne 0 ] || [ $MAINBOARD_OK -ne 0 ] || [ $VENDOR_OK -ne 0 ] || [ $FORCE_ENABLED_CROS -eq 1 ]; then junit " <testcase classname='board${testclass/#/.}' name='$BUILD_NAME' >" @@ -587,7 +595,7 @@ Options:\n" [-J|--junit] Write JUnit formatted xml log file [-K|--kconfig <name>] Prepend file to generated Kconfig [-l|--loglevel <num>] Set loglevel - [-L|--clang] Use clang + [-L|--clang] Use clang on supported arch [-o|--outdir <path>] Store build results in path (defaults to $TARGET) [-p|--payloads <dir>] Use payloads in <dir> to build images @@ -671,6 +679,7 @@ if [ $retval != 0 ]; then fi chromeos=false +clang=false clean_work=false clean_objs=false verboseopt='V=0' @@ -738,6 +747,7 @@ while true ; do configoptions="${configoptions}CONFIG_ANY_TOOLCHAIN=y\n" ;; -L|--clang) shift + clang=true customizing="${customizing}, clang" configoptions="${configoptions}CONFIG_COMPILER_LLVM_CLANG=y\n# CONFIG_COMPILER_GCC is not set\n" ;; |