diff options
author | Nico Huber <nico.h@gmx.de> | 2018-11-04 16:16:29 +0100 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2018-11-05 21:33:13 +0000 |
commit | dd477e9ba3f30a8ee9c7ee1625db2ec4f2c84523 (patch) | |
tree | 7e19ff540b46f6fc30129885993c41c2516008ed | |
parent | b133c61a9151b3b7b9c6b62091a606498c5f7568 (diff) |
coreboot-sdk: Build Clang first in a separate step
If we build one of the `all*` targets, build Clang first. Compiling
Clang (just for the host arch, I assume) takes more than half of the
time of the default build. When run as a separate step, we can make
use of Docker's cache if any step after Clang fails.
Change-Id: If67b458cde656f1dc6774215f6a575a48d12b797
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/29455
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
-rw-r--r-- | util/docker/coreboot-sdk/Dockerfile | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/util/docker/coreboot-sdk/Dockerfile b/util/docker/coreboot-sdk/Dockerfile index bdfbf4add0..739e0d1149 100644 --- a/util/docker/coreboot-sdk/Dockerfile +++ b/util/docker/coreboot-sdk/Dockerfile @@ -74,12 +74,19 @@ RUN \ RUN \ cd /root && \ git clone https://review.coreboot.org/coreboot && \ - cd coreboot/util/crossgcc && \ - git checkout {{DOCKER_COMMIT}} && \ - make {{CROSSGCC_PARAM}} \ + cd coreboot && \ + git checkout {{DOCKER_COMMIT}} + +RUN \ + if echo {{CROSSGCC_PARAM}} | grep -q ^all; then \ + make -C/root/coreboot/util/crossgcc/ build_clang \ + BUILD_LANGUAGES=c,ada CPUS=$(nproc) DEST=/opt/xgcc; \ + fi + +RUN \ + make -C/root/coreboot/util/crossgcc/ {{CROSSGCC_PARAM}} \ BUILD_LANGUAGES=c,ada CPUS=$(nproc) DEST=/opt/xgcc && \ - cd /root && \ - rm -rf coreboot + rm -rf /root/coreboot RUN mkdir /home/coreboot/.ccache && \ chown coreboot:coreboot /home/coreboot/.ccache && \ |