gitlab-ci: Pass --target explicitly to configure on Windows
authorBen Gamari <ben@smart-cactus.org>
Thu, 21 Mar 2019 03:45:26 +0000 (23:45 -0400)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Fri, 22 Mar 2019 03:45:03 +0000 (23:45 -0400)
Otherwise configure fails in the 32-bit case with
```
This GHC (c:/GitLabRunner/builds/8fc0e283/0/ghc/ghc/toolchain/bin/ghc) does not generate code for the build platform
   GHC target platform    : x86_64-unknown-mingw32
   Desired build platform : i386-unknown-mingw32
```

.gitlab-ci.yml

index 2f20430..0364cec 100644 (file)
@@ -521,7 +521,7 @@ nightly-i386-windows-hadrian:
   script:
     - |
       python boot
-      bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex'
+      bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex $CONFIGURE_ARGS'
     - bash -c "echo include mk/flavours/${BUILD_FLAVOUR}.mk > mk/build.mk"
     - bash -c "PATH=`pwd`/toolchain/bin:$PATH make -j`mk/detect-cpu-count.sh`"
     - bash -c "PATH=`pwd`/toolchain/bin:$PATH make binary-dist TAR_COMP_OPTS=-1"
@@ -541,6 +541,7 @@ validate-x86_64-windows:
   extends: .build-windows-make
   variables:
     MSYSTEM: MINGW64
+    CONFIGURE_ARGS: "--target=x86_64-unknown-mingw32"
   cache:
     key: x86_64-windows
 
@@ -550,6 +551,7 @@ release-x86_64-windows:
   variables:
     MSYSTEM: MINGW64
     BUILD_FLAVOUR: "perf"
+    CONFIGURE_ARGS: "--target=x86_64-unknown-mingw32"
   only:
     - tags
 
@@ -560,6 +562,7 @@ release-i386-windows:
   variables:
     MSYSTEM: MINGW32
     BUILD_FLAVOUR: "perf"
+    CONFIGURE_ARGS: "--target=i386-unknown-mingw32"
   cache:
     key: i386-windows
 
@@ -570,6 +573,7 @@ nightly-i386-windows:
       - $NIGHTLY
   variables:
     MSYSTEM: MINGW32
+    CONFIGURE_ARGS: "--target=i386-unknown-mingw32"
   cache:
     key: i386-windows