[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/6] CI: Only calculate ./configure args if needed


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 30 Dec 2022 00:38:45 +0000
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
  • Delivery-date: Fri, 30 Dec 2022 00:39:11 +0000
  • Ironport-data: A9a23:0jPNZ6/m/rYZNxCqjT4jDrUDTX6TJUtcMsCJ2f8bNWPcYEJGY0x3z DYYDGnTOamMNmv9eIt0Oom/phgBvJLUnNFmHgNu+Cs8E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjUAOG6UKucYHsZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ire7kIx1BjOkGlA5AZnP6oa5AS2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDkkS/ /gBDT1cXyuhhuGM3beeZLh015sseZyD0IM34hmMzBncBPciB5vCX7/L9ZlT2zJYasJmRKiEI ZBDMHw2MUqGM0Yn1lQ/UfrSmM+BgHXlfiIeg1WSvactuEDYzRBr0airO93QEjCPbZQNwxzJ+ T2Xl4j/Khs6O+KR6iSCznmDpf7Bhz72ca0bSoTto5aGh3XMnzdOWXX6T2CTpPiyike6HdVFO UEQ0iMroe4580nDZt75Uh6joX/CvQMGXNFQEOoS5wSEy66S6AGcbkAUQzgEZNE4ucseQT0xy kTPj97vHSZosrCeVTSa7Lj8hTi7IyQSIEcJbDUISgZD6N7myKkolQ7GRNtnFK+zj/X2FCv2z jTMqzIx74j/luZSif/9pwqexWvx+N6ZFWbZ+zk7QEr55AdgQYP0VreK6Fvh8PNlAteBHwaO6 S1sd9el0MgCCpSElSqoSeoLHa206/vtDAAwkWKDDLF6qW3zpifLkZR4pWgneRw3appslSrBO he7hO9H2HNE0JJGh4dTapn5NcklxLOI+T/NBqGNNYomjnScmWa6EMBSiay4hTuFfKsEy/tX1 XKnnSGEUx4n5VxPlmbeegvk+eZDKtoC7W3SX4vn6B+szKCTYnWYIZ9cbgTUNbtpvP3V+lSOm zq6Cydt40wFONASnwGNqdJDRbz0BSNT6W/KRzx/KbfYf1sO9JAJAP7N27IxE7FYc1Buvr6Qp BmVAxYIoGcTcFWbcW1mnFg/MuKwNXu+xFpnVRER0aGAgSl+PNj+tPdEH3b1FJF+nNFeITdPZ 6FtU6297j5nE1wrJxx1gUHBkbFf
  • Ironport-hdrordr: A9a23:TZcQsqpl7CA6urnqftXFdEIaV5oleYIsimQD101hICG9E/b1qy nKpp8mPHDP5wr5NEtPpTnjAsm9qALnlKKdiLN5Vd3OYOCMghrKEGgN1/qG/xTQXwH46+5Bxe NBXsFFebnN5IFB/KTH3DU=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This is purely code motion of the cfgargs construction, into the case where it
is used.

No practical change.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Doug Goldstein <cardoe@xxxxxxxxxx>
CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
CC: Anthony PERARD <anthony.perard@xxxxxxxxxx>
CC: Michal Orzel <michal.orzel@xxxxxxx>
CC: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
---
 automation/scripts/build | 63 ++++++++++++++++++++++++------------------------
 1 file changed, 31 insertions(+), 32 deletions(-)

diff --git a/automation/scripts/build b/automation/scripts/build
index 8dee1cbbc251..f2301d08789d 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -39,37 +39,6 @@ if [[ "${XEN_TARGET_ARCH}" = "arm32" ]]; then
     hypervisor_only="y"
 fi
 
-# build up our configure options
-cfgargs=()
-cfgargs+=("--enable-docs")
-
-if [[ "${CC}" == "clang"* ]]; then
-    # SeaBIOS cannot be built with clang
-    cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin")
-    # iPXE cannot be built with clang
-    cfgargs+=("--with-system-ipxe=/usr/lib/ipxe/ipxe.pxe")
-    # newlib cannot be built with clang so we cannot build stubdoms
-    cfgargs+=("--disable-stubdom")
-fi
-
-if ! test -z "$(ldd /bin/ls|grep musl|head -1)"; then
-    # disable --disable-werror for QEMUU when building with MUSL
-    cfgargs+=("--with-extra-qemuu-configure-args=\"--disable-werror\"")
-    # SeaBIOS doesn't build on MUSL systems
-    cfgargs+=("--with-system-seabios=/bin/false")
-fi
-
-# Qemu requires Python 3.5 or later, and ninja
-if ! type python3 || python3 -c "import sys; res = sys.version_info < (3, 5); 
exit(not(res))" \
-        || ! type ninja; then
-    cfgargs+=("--with-system-qemu=/bin/false")
-fi
-
-# SeaBIOS requires GCC 4.6 or later
-if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then
-    cfgargs+=("--with-system-seabios=/bin/false")
-fi
-
 # Directory for the artefacts to be dumped into
 mkdir binaries
 
@@ -80,7 +49,37 @@ if [[ "${hypervisor_only}" == "y" ]]; then
     # Preserve artefacts
     cp xen/xen binaries/xen
 else
-    # Full build
+    # Full build.  Figure out our ./configure options
+    cfgargs=()
+    cfgargs+=("--enable-docs")
+
+    if [[ "${CC}" == "clang"* ]]; then
+        # SeaBIOS cannot be built with clang
+        cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin")
+        # iPXE cannot be built with clang
+        cfgargs+=("--with-system-ipxe=/usr/lib/ipxe/ipxe.pxe")
+        # newlib cannot be built with clang so we cannot build stubdoms
+        cfgargs+=("--disable-stubdom")
+    fi
+
+    if  ! test -z "$(ldd /bin/ls|grep musl|head -1)"; then
+        # disable --disable-werror for QEMUU when building with MUSL
+        cfgargs+=("--with-extra-qemuu-configure-args=\"--disable-werror\"")
+        # SeaBIOS doesn't build on MUSL systems
+        cfgargs+=("--with-system-seabios=/bin/false")
+    fi
+
+    # Qemu requires Python 3.5 or later, and ninja
+    if ! type python3 || python3 -c "import sys; res = sys.version_info < (3, 
5); exit(not(res))" \
+            || ! type ninja; then
+        cfgargs+=("--with-system-qemu=/bin/false")
+    fi
+
+    # SeaBIOS requires GCC 4.6 or later
+    if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then
+        cfgargs+=("--with-system-seabios=/bin/false")
+    fi
+
     ./configure "${cfgargs[@]}"
     make -j$(nproc) dist
 
-- 
2.11.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.