From 5e63c96aa7b4e7fd8758cdc4753eece3a42481e0 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 30 Oct 2019 09:18:43 -0400 Subject: [PATCH 1/3] common/console.c: Fix unused warning with console_doenv() Newer versions of LLVM-7 will provide an unused function warning over console_doenv() in the case of SYS_CONSOLE_IS_IN_ENV not being enabled as can be the case in SPL. Add guards around this function. Signed-off-by: Tom Rini --- common/console.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/console.c b/common/console.c index 89b1e9590c..168ba60d0d 100644 --- a/common/console.c +++ b/common/console.c @@ -252,10 +252,12 @@ static void console_puts(int file, const char *s) } } +#if CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV) static inline void console_doenv(int file, struct stdio_dev *dev) { iomux_doenv(file, dev->name); } +#endif #else static inline int console_getc(int file) { @@ -283,10 +285,12 @@ static inline void console_puts(int file, const char *s) stdio_devices[file]->puts(stdio_devices[file], s); } +#if CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV) static inline void console_doenv(int file, struct stdio_dev *dev) { console_setfile(file, dev); } +#endif #endif /* CONIFIG_IS_ENABLED(CONSOLE_MUX) */ /** U-Boot INITIAL CONSOLE-NOT COMPATIBLE FUNCTIONS *************************/ From 626b0389ecebbdab8ea8f29eb80c0d400376db28 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sat, 26 Oct 2019 13:48:41 -0400 Subject: [PATCH 2/3] travis: Fix the clang-7 test When using the OVERRIDE variable we need to pass -O to buildman as well to use the "override" option to buildman. Fixed: e9500f49ea35 ("travis: Use buildman for building with clang") Signed-off-by: Tom Rini --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1e98378695..f6aec96770 100644 --- a/.travis.yml +++ b/.travis.yml @@ -389,7 +389,7 @@ matrix: env: - TEST_PY_BD="sandbox" BUILDMAN="^sandbox$" - OVERRIDE="clang-7" + OVERRIDE="-O clang-7" - name: "test/py sandbox_spl" env: - TEST_PY_BD="sandbox_spl" From 0219d014a781e4b79f9889a479f9b3782d76aeff Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 6 Nov 2019 19:30:47 -0500 Subject: [PATCH 3/3] gitlab/azure: Enable LLVM tests Now that we have again fixed the problems that building with clang exposes, enable these tests on Azure and GitLab-CI as well. Signed-off-by: Tom Rini --- .azure-pipelines.yml | 5 +++++ .gitlab-ci.yml | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 862cced1cc..44a76ebb09 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -149,6 +149,10 @@ jobs: sandbox: TEST_PY_BD: "sandbox" BUILDMAN: "^sandbox$" + sandbox_clang: + TEST_PY_BD: "sandbox" + BUILDMAN: "^sandbox$" + OVERRIDE: "-O clang-7" sandbox_spl: TEST_PY_BD: "sandbox_spl" TEST_PY_TEST_SPEC: "test_ofplatdata" @@ -238,6 +242,7 @@ jobs: export TEST_PY_ID="${TEST_PY_ID}" export TEST_PY_TEST_SPEC="${TEST_PY_TEST_SPEC}" export BUILDMAN="${BUILDMAN}" + export OVERRIDE="${OVERRIDE}" EOF cat << "EOF" >> test.sh # the below corresponds to .gitlab-ci.yml "before_script" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9b295ac710..0f5271dcd3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -178,6 +178,14 @@ sandbox test.py: BUILDMAN: "^sandbox$" <<: *buildman_and_testpy_dfn +sandbox with clang test.py: + tags: [ 'all' ] + variables: + TEST_PY_BD: "sandbox" + BUILDMAN: "^sandbox$" + OVERRIDE: "-O clang-7" + <<: *buildman_and_testpy_dfn + sandbox_spl test.py: tags: [ 'all' ] variables: