[Git][ghc/ghc][master] 3 commits: utils: add hie.yaml config file for ghc-config
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Fri May 31 19:52:34 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
7eda4bd2 by Cheng Shao at 2024-05-31T15:52:04-04:00
utils: add hie.yaml config file for ghc-config
Add hie.yaml to ghc-config project directory so it can be edited using
HLS.
- - - - -
1e5752f6 by Cheng Shao at 2024-05-31T15:52:05-04:00
hadrian: handle findExecutable "" gracefully
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.
- - - - -
4eb5ad09 by Cheng Shao at 2024-05-31T15:52:05-04:00
configure: do not set LLC/OPT/LLVMAS fallback values when FIND_LLVM_PROG fails
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.
- - - - -
6 changed files:
- hadrian/src/Hadrian/Utilities.hs
- hadrian/src/Rules/Docspec.hs
- hadrian/src/Rules/Lint.hs
- hadrian/src/Settings/Builders/RunTest.hs
- m4/fp_settings.m4
- + testsuite/ghc-config/hie.yaml
Changes:
=====================================
hadrian/src/Hadrian/Utilities.hs
=====================================
@@ -19,6 +19,7 @@ module Hadrian.Utilities (
copyFile, copyFileUntracked, createFileLink, fixFile,
makeExecutable, moveFile, removeFile, createDirectory, copyDirectory,
moveDirectory, removeDirectory, removeFile_, writeFileChangedBS,
+ findExecutable,
-- * Diagnostic info
Colour (..), ANSIColour (..), putColoured, shouldUseColor,
@@ -668,3 +669,7 @@ renderUnicorn ls =
ponyPadding = " "
boxLines :: [String]
boxLines = ["", "", ""] ++ (lines . renderBox $ ls)
+
+-- Workaround for https://github.com/haskell/directory/issues/180
+findExecutable :: String -> IO (Maybe FilePath)
+findExecutable exe = IO.catch (IO.findExecutable exe) $ \(_ :: IO.IOException) -> pure Nothing
=====================================
hadrian/src/Rules/Docspec.hs
=====================================
@@ -2,8 +2,6 @@ module Rules.Docspec
( docspecRules
) where
-import System.Directory (findExecutable)
-
import Base
import Context.Path
import Settings.Builders.Common
=====================================
hadrian/src/Rules/Lint.hs
=====================================
@@ -4,7 +4,6 @@ module Rules.Lint
import Base
import Settings.Builders.Common
-import System.Directory (findExecutable)
import System.Exit (exitFailure)
lintRules :: Rules ()
=====================================
hadrian/src/Settings/Builders/RunTest.hs
=====================================
@@ -16,7 +16,6 @@ import Settings.Builders.Common
import qualified Data.Set as Set
import Flavour
import qualified Context.Type as C
-import System.Directory (findExecutable)
import Settings.Program
import qualified Context.Type
=====================================
m4/fp_settings.m4
=====================================
@@ -123,19 +123,10 @@ AC_DEFUN([FP_SETTINGS],
fi
# LLVM backend tools
- if test -z "$LlcCmd"; then
- LlcCmd="llc"
- fi
SettingsLlcCommand="$LlcCmd"
- if test -z "$OptCmd"; then
- OptCmd="opt"
- fi
SettingsOptCommand="$OptCmd"
- if test -z "$LlvmAsCmd"; then
- LlvmAsCmd="clang"
- fi
SettingsLlvmAsCommand="$LlvmAsCmd"
# Mac-only tools
=====================================
testsuite/ghc-config/hie.yaml
=====================================
@@ -0,0 +1,2 @@
+cradle:
+ cabal:
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bf0737c0b86a36ccc5523582dea6979e020fb547...4eb5ad09cf93caa5791a735baa0e7ba86b916f2a
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bf0737c0b86a36ccc5523582dea6979e020fb547...4eb5ad09cf93caa5791a735baa0e7ba86b916f2a
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/20240531/a8d680ed/attachment-0001.html>
More information about the ghc-commits
mailing list