[Git][ghc/ghc][master] 7 commits: mingw: Extract zst toolchain archives

Ben Gamari gitlab at gitlab.haskell.org
Fri Oct 16 04:16:11 UTC 2020



Ben Gamari pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
1bb0512f by Ben Gamari at 2020-10-16T00:15:31-04:00
mingw: Extract zst toolchain archives

This should have been done when the toolchain was bumped.

- - - - -
bf7c5b6d by Ben Gamari at 2020-10-16T00:15:31-04:00
base: Reintroduce necessary LANGUAGE pragmas

These were incorrectly removed in a recent cleanup commit.

- - - - -
c6b4be4b by Ben Gamari at 2020-10-16T00:15:31-04:00
testsuite: Sort metrics by metric type

Closes #18838.

- - - - -
c7989c93 by Ben Gamari at 2020-10-16T00:15:31-04:00
testsuite: Account for -Wnoncanonical-monoid-instances changes on Windows

- - - - -
330a5433 by Ben Gamari at 2020-10-16T00:15:31-04:00
rts: Add __mingw_vfprintf to RtsSymbols.c

Following the model of the other printf symbols. See Note [Symbols for
MinGW's printf].

- - - - -
c4a69f37 by Ben Gamari at 2020-10-16T00:15:31-04:00
gitlab-ci: Remove allow_failure from Windows jobs

- - - - -
9a9679db by Ben Gamari at 2020-10-16T00:15:31-04:00
gitlab-ci: Fix Hadrian bindist names

- - - - -


9 changed files:

- .gitlab-ci.yml
- .gitlab/ci.sh
- configure.ac
- libraries/base/GHC/IO/Handle/Lock/Windows.hsc
- rts/RtsSymbols.c
- testsuite/driver/runtests.py
- testsuite/tests/ghci/scripts/T9293.stdout-mingw32
- testsuite/tests/ghci/scripts/ghci024.stdout-mingw32
- testsuite/tests/ghci/scripts/ghci057.stdout-mingw32


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -5,8 +5,8 @@ variables:
   DOCKER_REV: 6ceb0cecaeefd4927b26c054e4897724986078c8
 
   # Sequential version number capturing the versions of all tools fetched by
-  # .gitlab/ci.sh.
-  WINDOWS_TOOLCHAIN_VERSION: 3
+  # .gitlab/ci.sh. Used for invalidation of GitLab CI cache.
+  WINDOWS_TOOLCHAIN_VERSION: 4
 
   # Disable shallow clones; they break our linting rules
   GIT_DEPTH: 0
@@ -212,7 +212,7 @@ lint-release-changelogs:
       junit: junit.xml
     expire_in: 2 week
     paths:
-      - ghc.tar.xz
+      - "$BIN_DIST_NAME.tar.xz"
       - junit.xml
 
 .validate-linux-hadrian:
@@ -220,6 +220,7 @@ lint-release-changelogs:
   image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
   variables:
     TEST_ENV: "x86_64-linux-deb9-hadrian"
+    BIN_DIST_NAME: "ghc-x86_64-deb9-linux"
   before_script:
     # workaround for docker permissions
     - sudo chown ghc:ghc -R .
@@ -399,7 +400,7 @@ release-x86_64-freebsd:
     HADRIAN_ARGS: "--docs=no-sphinx"
     GHC_VERSION: 8.6.3
     CABAL_INSTALL_VERSION: 3.0.0.0
-    BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-portbld-freebsd.tar.xz"
+    BIN_DIST_NAME: "ghc-x86_64-portbld-freebsd"
     TEST_ENV: "x86_64-freebsd-hadrian"
     FLAVOUR: "validate"
   after_script:
@@ -464,6 +465,7 @@ validate-x86_64-darwin:
     LANG: "en_US.UTF-8"
     CONFIGURE_ARGS: --with-intree-gmp
     TEST_ENV: "x86_64-darwin-hadrian"
+    BIN_DIST_NAME: "ghc-x86_64-apple-darwin"
     FLAVOUR: "validate"
   script:
     - .gitlab/ci.sh setup
@@ -479,7 +481,7 @@ validate-x86_64-darwin:
     reports:
       junit: junit.xml
     paths:
-      - ghc.tar.xz
+      - "$BIN_DIST_NAME.tar.xz"
       - junit.xml
 
 .validate-linux:
@@ -785,7 +787,7 @@ release-x86_64-linux-deb8:
   allow_failure: true
   variables:
     TEST_ENV: "x86_64-linux-alpine"
-    BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-alpine-linux.tar.xz"
+    BIN_DIST_NAME: "ghc-x86_64-alpine-linux"
     # Can't use ld.gold due to #13958.
     CONFIGURE_ARGS: "--disable-ld-override"
     HADRIAN_ARGS: "--docs=no-sphinx"
@@ -856,9 +858,7 @@ validate-x86_64-linux-fedora27:
 ############################################################
 
 .build-windows:
-  # For the reasons given in #17777 this build isn't reliable.
   needs: [validate-x86_64-linux-deb9-hadrian]
-  allow_failure: true
   before_script:
     - git clean -xdf
 
@@ -903,7 +903,7 @@ validate-x86_64-linux-fedora27:
     expire_in: 2 week
     when: always
     paths:
-      - ghc.tar.xz
+      - "$BIN_DIST_NAME.tar.xz"
       - junit.xml
 
 .build-x86_64-windows-hadrian:
@@ -911,6 +911,7 @@ validate-x86_64-linux-fedora27:
   variables:
     MSYSTEM: MINGW64
     TEST_ENV: "x86_64-windows"
+    BIN_DIST_NAME: "ghc-x86_64-unknown-mingw32"
   cache:
     key: "x86_64-windows-$WINDOWS_TOOLCHAIN_VERSION"
 
@@ -970,6 +971,7 @@ release-x86_64-windows-integer-simple:
   variables:
     BIGNUM_BACKEND: native
     BUILD_FLAVOUR: "perf"
+    BIN_DIST_NAME: "ghc-x86_64-mingw32-unknown-nogmp"
 
 
 ############################################################
@@ -987,9 +989,7 @@ doc-tarball:
     - validate-x86_64-windows-hadrian
   variables:
     LINUX_BINDIST: "ghc-x86_64-deb9-linux-debug.tar.xz"
-    WINDOWS_BINDIST: "ghc-x86_64-mingw32.tar.xz"
-  # Due to Windows allow_failure
-  allow_failure: true
+    WINDOWS_BINDIST: "ghc-x86_64-unknown-mingw32.tar.xz"
   artifacts:
     paths:
       - haddock.html.tar.xz
@@ -1155,8 +1155,6 @@ pages:
   dependencies:
     - doc-tarball
   image: ghcci/x86_64-linux-deb9:0.2
-  # Due to Windows allow_failure
-  allow_failure: true
   tags:
     - x86_64-linux
   script:


=====================================
.gitlab/ci.sh
=====================================
@@ -377,10 +377,13 @@ function build_hadrian() {
   if [ -z "$FLAVOUR" ]; then
     fail "FLAVOUR not set"
   fi
+  if [ -z "$BIN_DIST_NAME" ]; then
+    fail "BIN_DIST_NAME not set"
+  fi
 
   run_hadrian binary-dist
 
-  mv _build/bindist/ghc*.tar.xz ghc.tar.xz
+  mv _build/bindist/ghc*.tar.xz $BIN_DIST_NAME.tar.xz
 }
 
 function test_hadrian() {


=====================================
configure.ac
=====================================
@@ -417,7 +417,8 @@ set_up_tarballs() {
         rm -rf inplace/mingw
         local base_dir="../ghc-tarballs/${tarball_dest_dir}"
         ( cd inplace &&
-        find "${base_dir}" -name "*.tar.xz" -exec tar xfJ {} \; &&
+        find "${base_dir}" -name "*.tar.xz" -exec tar --xz -xf {} \; &&
+        find "${base_dir}" -name "*.tar.zst" -exec tar --zstd -xf {} \; &&
         rm ".MTREE" &&
         rm ".PKGINFO" &&
         cd .. ) || AC_MSG_ERROR([Could not extract Windows toolchains.])


=====================================
libraries/base/GHC/IO/Handle/Lock/Windows.hsc
=====================================
@@ -1,6 +1,8 @@
 {-# LANGUAGE CPP #-}
 {-# LANGUAGE InterruptibleFFI #-}
 {-# LANGUAGE NoImplicitPrelude #-}
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE MultiWayIf #-}
 
 -- | File locking for Windows.
 module GHC.IO.Handle.Lock.Windows where


=====================================
rts/RtsSymbols.c
=====================================
@@ -151,7 +151,9 @@
          __imp___acrt_iob_func, __rts_iob_func, true))   \
       RTS_WIN32_ONLY(SymI_HasProto_redirect(             \
          __imp____acrt_iob_func, __rts_iob_func, true))  \
-      SymI_HasProto(__mingw_vsnwprintf)
+      SymI_HasProto(__mingw_vsnwprintf)                  \
+      /* ^^ Need to figure out why this is needed.  */   \
+      SymI_HasProto(__mingw_vfprintf)                    \
       /* ^^ Need to figure out why this is needed.  */
 
 #define RTS_MINGW_COMPAT_SYMBOLS                         \


=====================================
testsuite/driver/runtests.py
=====================================
@@ -457,7 +457,21 @@ else:
     if config.baseline_commit:
         print('Performance baseline: %s\n' % config.baseline_commit)
     if any(t.metrics):
-        tabulate_metrics(t.metrics)
+        # Group metrics by metric type
+        groups = {} # type: Dict[MetricName, List[PerfMetric]]
+        for m in t.metrics:
+            if m.stat.metric not in groups:
+                groups[m.stat.metric] = []
+
+            groups[m.stat.metric].append(m)
+
+        for metric_name, stats in groups.items():
+            heading = 'Metrics: %s' % metric_name
+            print()
+            print(heading)
+            print('-' * len(heading))
+            print()
+            tabulate_metrics(stats)
     else:
         print("\nNone collected.")
     print("")


=====================================
testsuite/tests/ghci/scripts/T9293.stdout-mingw32
=====================================
@@ -13,7 +13,6 @@ other dynamic, non-language, flag settings:
   -fshow-warning-groups
 warning settings:
   -Wsemigroup
-  -Wnoncanonical-monoid-instances
   -Wstar-is-type
   -Wcompat-unqualified-imports
 Should fail, GADTs is not enabled
@@ -35,7 +34,6 @@ other dynamic, non-language, flag settings:
   -fshow-warning-groups
 warning settings:
   -Wsemigroup
-  -Wnoncanonical-monoid-instances
   -Wstar-is-type
   -Wcompat-unqualified-imports
 Should work, GADTs is in force from :set
@@ -56,7 +54,6 @@ other dynamic, non-language, flag settings:
   -fshow-warning-groups
 warning settings:
   -Wsemigroup
-  -Wnoncanonical-monoid-instances
   -Wstar-is-type
   -Wcompat-unqualified-imports
 Should fail, GADTs is now disabled
@@ -79,7 +76,6 @@ other dynamic, non-language, flag settings:
   -fshow-warning-groups
 warning settings:
   -Wsemigroup
-  -Wnoncanonical-monoid-instances
   -Wstar-is-type
   -Wcompat-unqualified-imports
 Should fail, GADTs is only enabled at the prompt


=====================================
testsuite/tests/ghci/scripts/ghci024.stdout-mingw32
=====================================
@@ -14,7 +14,6 @@ other dynamic, non-language, flag settings:
   -fshow-warning-groups
 warning settings:
   -Wsemigroup
-  -Wnoncanonical-monoid-instances
   -Wstar-is-type
   -Wcompat-unqualified-imports
 ~~~~~~~~~~ Testing :set -a


=====================================
testsuite/tests/ghci/scripts/ghci057.stdout-mingw32
=====================================
@@ -13,7 +13,6 @@ other dynamic, non-language, flag settings:
   -fshow-warning-groups
 warning settings:
   -Wsemigroup
-  -Wnoncanonical-monoid-instances
   -Wstar-is-type
   -Wcompat-unqualified-imports
 Should fail, GADTs is not enabled
@@ -35,7 +34,6 @@ other dynamic, non-language, flag settings:
   -fshow-warning-groups
 warning settings:
   -Wsemigroup
-  -Wnoncanonical-monoid-instances
   -Wstar-is-type
   -Wcompat-unqualified-imports
 Should work, GADTs is in force from :set
@@ -56,7 +54,6 @@ other dynamic, non-language, flag settings:
   -fshow-warning-groups
 warning settings:
   -Wsemigroup
-  -Wnoncanonical-monoid-instances
   -Wstar-is-type
   -Wcompat-unqualified-imports
 Should fail, GADTs is now disabled
@@ -79,7 +76,6 @@ other dynamic, non-language, flag settings:
   -fshow-warning-groups
 warning settings:
   -Wsemigroup
-  -Wnoncanonical-monoid-instances
   -Wstar-is-type
   -Wcompat-unqualified-imports
 Should fail, GADTs is only enabled at the prompt



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cc536288c32df9c4b9f37020b76348f58a57b3cb...9a9679dbfc77c600e6c2a031ccab37d203a19cf9

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cc536288c32df9c4b9f37020b76348f58a57b3cb...9a9679dbfc77c600e6c2a031ccab37d203a19cf9
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201016/976be0d2/attachment-0001.html>


More information about the ghc-commits mailing list