We want $CC to be set so that ccache is used by default, but
some jobs (Go and MinGW) don't like that very much.

Later on, we might consider building a link farm so that we
can use ccache without having to set $CC; for the time being,
work around the issue at the job level.

Signed-off-by: Andrea Bolognani <abolo...@redhat.com>
---
 jobs/autotools.yaml | 7 +++++++
 jobs/go.yaml        | 8 ++++++++
 2 files changed, 15 insertions(+)

diff --git a/jobs/autotools.yaml b/jobs/autotools.yaml
index 98bb1b0..b882803 100644
--- a/jobs/autotools.yaml
+++ b/jobs/autotools.yaml
@@ -223,6 +223,10 @@
       - shell: |
           {global_env}
           {local_env}
+          # The way we perform MinGW builds doesn't play well with the $CC
+          # variable containing whitespace, so we have to unset it here.
+          export CC=
+
           mkdir -p build32
           cd build32
 
@@ -235,6 +239,9 @@
       - shell: |
           {global_env}
           {local_env}
+          # See above
+          export CC=
+
           mkdir -p build64
           cd build64
 
diff --git a/jobs/go.yaml b/jobs/go.yaml
index 29a9f51..2634cb2 100644
--- a/jobs/go.yaml
+++ b/jobs/go.yaml
@@ -42,6 +42,11 @@
       - shell: |
           {global_env}
           {local_env}
+          # go doesn't handle the $CC variable containing whitespace
+          # correctly, so we have to make sure it's unset when building.
+          # See https://github.com/golang/go/issues/11685
+          export CC=
+
           go build -v
     publishers:
       - email:
@@ -80,6 +85,9 @@
       - shell: |
           {global_env}
           {local_env}
+          # See above
+          export CC=
+
           go test $TEST_ARGS
     publishers:
       - email:
-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to