Skip to content
Snippets Groups Projects
  1. Mar 03, 2025
    • Cheng Shao's avatar
      testsuite: remove undesired -fasm flag from test ways · a60edd39
      Cheng Shao authored
      This patch removes the -fasm flag from test ways, except ways like
      optasm that explicitly state they are meant to be compiled with NCG
      backend. Most test ways should use the default codegen backend, and
      the precense of -fasm can cause stderr mismatches like this when GHC
      is configured with the unregisterised backend:
      
      ```
      --- /dev/null
      +++ /tmp/ghctest-3hydwldj/test   spaces/testsuite/tests/profiling/should_compile/prof-late-cc.run/prof-late-cc.comp.stderr.normalised
      @@ -0,0 +1,2 @@
      +when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)]
      +    Target platform uses unregisterised ABI, so compiling via C
      *** unexpected failure for prof-late-cc(prof_no_auto)
      ```
      
      This has been breaking the wasm unreg nightly job since !12595 landed.
      
      (cherry picked from commit 88488847)
      a60edd39
    • Cheng Shao's avatar
      testsuite: bump T17572 timeout on wasm32 · e5c14d3a
      Cheng Shao authored
      (cherry picked from commit 64fba310)
      e5c14d3a
    • Cheng Shao's avatar
      rts: replace ad-hoc MYTASK_USE_TLV with proper CC_SUPPORTS_TLS · 8d9ba13e
      Cheng Shao authored
      This patch replaces the ad-hoc `MYTASK_USE_TLV` with the
      `CC_SUPPORTS_TLS` macro. If TLS support is detected by autoconf, then
      we should use that for managing `myTask` in the threaded RTS.
      
      (cherry picked from commit f3017dd3)
      8d9ba13e
    • Cheng Shao's avatar
      rts: cleanup inlining logic · b30ee296
      Cheng Shao authored
      This patch removes pre-C11 legacy code paths related to
      INLINE_HEADER/STATIC_INLINE/EXTERN_INLINE macros, ensure EXTERN_INLINE
      is treated as static inline in most cases (fixes #24945), and also
      corrects the comments accordingly.
      
      (cherry picked from commit 35a64220)
      b30ee296
    • Cheng Shao's avatar
      testsuite: skip objc-hi/objcxx-hi when cross compiling · e940f6fd
      Cheng Shao authored
      objc-hi/objcxx-hi should be skipped when cross compiling. The existing
      opsys('darwin') predicate only asserts the host system is darwin but
      tells us nothing about the target, hence the oversight.
      
      (cherry picked from commit 595c0894)
      e940f6fd
    • Cheng Shao's avatar
      testsuite: bump T7653 timeout for wasm · b152fc69
      Cheng Shao authored
      (cherry picked from commit 2eee65e1)
      b152fc69
    • Cheng Shao's avatar
      compiler: remove unused CompilerInfo/LinkerInfo types · 29b4e041
      Cheng Shao authored
      This patch removes CompilerInfo/LinkerInfo types from the compiler
      since they aren't actually used anywhere.
      
      (cherry picked from commit 98ad1ea5)
      29b4e041
    • Cheng Shao's avatar
      testsuite: mark T7773 as fragile on wasm · affab920
      Cheng Shao authored
      (cherry picked from commit ae50a8eb)
      affab920
    • Cheng Shao's avatar
      compiler: fix -ddump-cmm-raw when compiling .cmm · 82c54182
      Cheng Shao authored
      This patch fixes missing -ddump-cmm-raw output when compiling .cmm,
      which is useful for debugging cmm related codegen issues.
      
      (cherry picked from commit 6346c669)
      82c54182
    • Cheng Shao's avatar
      configure: do not set LLC/OPT/LLVMAS fallback values when FIND_LLVM_PROG fails · dd359d63
      Cheng Shao authored
      When configure fails to find LLC/OPT/LLVMAS within supported version
      range, it used to set "llc"/"opt"/"clang" as fallback values. This
      behavior is particularly troublesome when the user has llc/opt/clang
      with other versions in their PATH and run the testsuite, since hadrian
      will incorrectly assume have_llvm=True and pass that to the testsuite
      driver, resulting in annoying optllvm test failures (#23186). If
      configure determines llc/opt/clang wouldn't work, then we shouldn't
      pretend it'll work at all, and the bindist configure will invoke
      FIND_LLVM_PROG check again at install time anyway.
      
      (cherry picked from commit 4eb5ad09)
      dd359d63
    • Cheng Shao's avatar
      hadrian: handle findExecutable "" gracefully · 51437def
      Cheng Shao authored
      hadrian may invoke findExecutable "" at run-time due to a certain
      program is not found by configure script. Which is fine and
      findExecutable is supposed to return Nothing in this case. However, on
      Windows there's a directory bug that throws an exception (see
      https://github.com/haskell/directory/issues/180), so we might as well
      use a wrapper for findExecutable and handle exceptions gracefully.
      
      (cherry picked from commit 1e5752f6)
      51437def
    • Cheng Shao's avatar
      utils: add hie.yaml config file for ghc-config · 9a76b120
      Cheng Shao authored
      Add hie.yaml to ghc-config project directory so it can be edited using
      HLS.
      
      (cherry picked from commit 7eda4bd2)
      9a76b120
    • Cheng Shao's avatar
      compiler: remove ArchWasm32 special case in cmmDoCmmSwitchPlans · 3b5ee790
      Cheng Shao authored
      This patch removes special consideration for ArchWasm32 in
      cmmDoCmmSwitchPlans, which means the compiler will now disable
      cmmImplementSwitchPlans for wasm unreg backend, just like unreg
      backend of other targets. We enabled it in the past to workaround some
      compile-time panic in older versions of LLVM, but those panics are no
      longer present, hence no need to keep this workaround.
      
      (cherry picked from commit bf0737c0)
      3b5ee790
    • Cheng Shao's avatar
      testsuite: mark process005 as fragile on JS · d0fd940d
      Cheng Shao authored
      (cherry picked from commit fd47e2e3)
      d0fd940d
    • Cheng Shao's avatar
      driver: build C/C++ with -ffunction-sections -fdata-sections when split sections is enabled · 3a1c3056
      Cheng Shao authored
      When -fsplit-sections is passed to GHC, pass -ffunction-sections
      -fdata-sections to gcc/clang when building C/C++. Previously,
      -fsplit-sections was only respected by the NCG/LLVM backends, but not
      the unregisterised backend; the GHC driver did not pass
      -fdata-sections and -ffunction-sections to the C compiler, which
      resulted in excessive executable sizes.
      
      Fixes #23381.
      
      -------------------------
      Metric Decrease:
          size_hello_artifact
          size_hello_unicode
      -------------------------
      
      (cherry picked from commit 02b1f91e)
      3a1c3056
    • Cheng Shao's avatar
      hadrian: build C/C++ with split sections when enabled · cca2a53c
      Cheng Shao authored
      When split sections is enabled, ensure -fsplit-sections is passed to
      GHC as well when invoking GHC to compile C/C++; and pass
      -ffunction-sections -fdata-sections to gcc/clang when compiling C/C++
      with the hadrian Cc builder. Fixes #23381.
      
      (cherry picked from commit 0958937e)
      cca2a53c
    • Cheng Shao's avatar
      testsuite: bump MultiLayerModulesDefsGhciReload timeout to 10x · 3bc1904d
      Cheng Shao authored
      (cherry picked from commit e17f2df9)
      3bc1904d
    • Cheng Shao's avatar
      testsuite: don't attempt to detect host cpu features when testing cross ghc · 2d7e85e4
      Cheng Shao authored
      The testsuite driver CPU feature detection logic only detects host CPU
      and only makes sense when we are not testing a cross GHC.
      
      (cherry picked from commit c4c6d714)
      2d7e85e4
    • Cheng Shao's avatar
      testsuite: bump T22744 timeout to 5x · 6590b0ad
      Cheng Shao authored
      (cherry picked from commit c739383b)
      6590b0ad
    • Cheng Shao's avatar
      autoconf: remove unused context diff check · 659b9c94
      Cheng Shao authored
      This patch removes redundant autoconf check for the context diff
      program given it isn't actually been used anywhere, especially since
      make removal.
      
      (cherry picked from commit b7bcf729)
      659b9c94
    • Cheng Shao's avatar
      rts: fix I/O manager compilation errors for win32 target · ab6cd6c9
      Cheng Shao authored
      This patch fixes I/O manager compilation errors for win32 target
      discovered when cross-compiling to win32 using recent clang:
      
      ```
      rts/win32/ThrIOManager.c:117:7: error:
           error: call to undeclared function 'is_io_mng_native_p'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
            117 |   if (is_io_mng_native_p ()) {
                |       ^
          |
      117 |   if (is_io_mng_native_p ()) {
          |       ^
      
      1 error generated.
      `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1)
      
      rts/fs.c:143:28: error:
           error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
            143 | int setErrNoFromWin32Error () {
                |                            ^
                |                             void
          |
      143 | int setErrNoFromWin32Error () {
          |                            ^
      
      1 error generated.
      `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1)
      
      rts/win32/ConsoleHandler.c:227:9: error:
           error: call to undeclared function 'interruptIOManagerEvent'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
            227 |         interruptIOManagerEvent ();
                |         ^
          |
      227 |         interruptIOManagerEvent ();
          |         ^
      
      rts/win32/ConsoleHandler.c:227:9: error:
           note: did you mean 'getIOManagerEvent'?
          |
      227 |         interruptIOManagerEvent ();
          |         ^
      
      rts/include/rts/IOInterface.h:27:10: error:
           note: 'getIOManagerEvent' declared here
             27 | void *   getIOManagerEvent  (void);
                |          ^
         |
      27 | void *   getIOManagerEvent  (void);
         |          ^
      
      1 error generated.
      `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1)
      
      rts/win32/ConsoleHandler.c:196:9: error:
           error: call to undeclared function 'setThreadLabel'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
            196 |         setThreadLabel(cap, t, "signal handler thread");
                |         ^
          |
      196 |         setThreadLabel(cap, t, "signal handler thread");
          |         ^
      
      rts/win32/ConsoleHandler.c:196:9: error:
           note: did you mean 'postThreadLabel'?
          |
      196 |         setThreadLabel(cap, t, "signal handler thread");
          |         ^
      
      rts/eventlog/EventLog.h:118:6: error:
           note: 'postThreadLabel' declared here
            118 | void postThreadLabel(Capability    *cap,
                |      ^
          |
      118 | void postThreadLabel(Capability    *cap,
          |      ^
      
      1 error generated.
      `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1)
      ```
      
      (cherry picked from commit 710665bd)
      ab6cd6c9
    • Cheng Shao's avatar
      testsuite: bump PartialDownSweep timeout to 5x on wasm32 · f0c84319
      Cheng Shao authored
      (cherry picked from commit b1e0c313)
      f0c84319
    • Cheng Shao's avatar
      testsuite: fix req_target_smp predicate · 68ebf5fa
      Cheng Shao authored
      (cherry picked from commit a580722e)
      68ebf5fa
    • Ben Gamari's avatar
      Bump time submodule to 1.14 · e2cab4b5
      Ben Gamari authored and Cheng Shao's avatar Cheng Shao committed
      As requested in #24528.
      
      -------------------------
      Metric Decrease:
          ghc_bignum_so
          rts_so
      Metric Increase:
          cabal_syntax_dir
          rts_so
          time_dir
          time_so
      -------------------------
      
      (cherry picked from commit 1dacb506)
      e2cab4b5
    • Sylvain Henry's avatar
      Fix TH dependencies (#22229) · d52e3006
      Sylvain Henry authored and Cheng Shao's avatar Cheng Shao committed
      Add a dependency between Syntax and Internal (via module reexport).
      
      (cherry picked from commit 4d78c53c)
      d52e3006
    • Teo Camarasu's avatar
      Remove unecessary stage0 packages · 4add298c
      Teo Camarasu authored and Cheng Shao's avatar Cheng Shao committed
      Historically quite a few packages had to be stage0 as they depended on
      `template-haskell` and that was stage0. In #23536 we made it so that was
      no longer the case. This allows us to remove a bunch of packages from
      this list.
      
      A few still remain. A new version of `Win32` is required by
      `semaphore-compat`. Including `Win32` in the stage0 set requires also
      including `filepath` because otherwise Hadrian's dependency logic gets
      confused. Once our boot compiler has a newer version of `Win32` all of
      these will be able to be dropped.
      
      Resolves #24652
      
      (cherry picked from commit dd339c7a)
      4add298c
    • Teo Camarasu's avatar
      Make template-haskell a stage1 package · b07add3a
      Teo Camarasu authored and Cheng Shao's avatar Cheng Shao committed
      
      Promoting template-haskell from a stage0 to a stage1 package means that
      we can much more easily refactor template-haskell.
      
      We implement this by duplicating the in-tree `template-haskell`.
      A new `template-haskell-next` library is autogenerated to mirror `template-haskell`
      `stage1:ghc` to depend on the new interface of the library including the
      `Binary` instances without adding an explicit dependency on `template-haskell`.
      
      This is controlled by the `bootstrap-th` cabal flag
      
      When building `template-haskell` modules as part of this vendoring we do
      not have access to quote syntax, so we cannot use variable quote
      notation (`'Just`). So we either replace these with hand-written `Name`s
      or hide the code behind CPP.
      
      We can remove the `th_hack` from hadrian, which was required when
      building stage0 packages using the in-tree `template-haskell` library.
      
      For more details see Note [Bootstrapping Template Haskell].
      
      Resolves #23536
      
      Co-Authored-By: default avatarSebastian Graf <sgraf1337@gmail.com>
      Co-Authored-By: default avatarMatthew Craven <5086-clyring@users.noreply.gitlab.haskell.org>
      (cherry picked from commit 42bd0407)
      b07add3a
    • Cheng Shao's avatar
      Revert "hadrian: Refactor treatment of extra dependencies" · 3f30d83f
      Cheng Shao authored
      This reverts commit 3a18d9e7.
      3f30d83f
    • amesgen's avatar
      compiler: handle CmmRegOff in lower_CmmExpr_Ptr · bab58579
      amesgen authored and Cheng Shao's avatar Cheng Shao committed
      (cherry picked from commit def46c8c)
      bab58579
    • amesgen's avatar
      compiler: refactor lower_CmmExpr_Ptr · 0c5b3314
      amesgen authored and Cheng Shao's avatar Cheng Shao committed
      (cherry picked from commit fb629e24)
      0c5b3314
    • Cheng Shao's avatar
      autoconf: set RELEASE=NO · 4ccf8dc5
      Cheng Shao authored
      4ccf8dc5
  2. Feb 28, 2025
  3. Feb 27, 2025
Loading