@@ -11,6 +11,9 @@ import Data.Char (isSpace)
1111import Data.List (dropWhileEnd , stripPrefix )
1212import Shakefiles.Extra
1313
14+ -- --ghc-option required because of https://gitlab.haskell.org/ghc/ghc/-/issues/20592
15+ ghcOptionFFI = " --ghc-option=-I/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/ffi"
16+
1417
1518cabalProject :: String -> [String ] -> [String ] -> [String ] -> [String ] -> [String ] -> Rules ()
1619cabalProject name sourceFiles sourcePatterns deps testPatterns testDeps =
@@ -35,16 +38,16 @@ cabalProject name sourceFiles sourcePatterns deps testPatterns testDeps =
3538 do
3639 " _build/cabal/" </> name </> " build.ok" %> \ out -> do
3740 hash <- needProjectFiles
38- cmd_ " cabal" " v2-build" " -O0" (name ++ " :libs" ) " --enable-tests"
41+ cmd_ " cabal" " v2-build" ghcOptionFFI " -O0" (cabalName name ++ " :libs" ) " --enable-tests"
3942 writeFile' out hash
4043
4144 cabalBinPath name " noopt" %> \ out -> do
4245 _ <- needProjectFiles
43- cmd_ " cabal" " v2-build" " -O0" (name ++ " :exes" ) " --enable-tests"
46+ cmd_ " cabal" " v2-build" ghcOptionFFI " -O0" (cabalName name ++ " :exes" ) " --enable-tests"
4447
4548 cabalBinPath name " opt" %> \ out -> do
4649 _ <- needProjectFiles
47- cmd_ " cabal" " v2-build" " -O2" (name ++ " :exes" )
50+ cmd_ " cabal" " v2-build" ghcOptionFFI " -O2" (cabalName name ++ " :exes" )
4851
4952 " _build/cabal/" </> name </> " test.ok" %> \ out -> do
5053 need globalConfig
@@ -55,7 +58,7 @@ cabalProject name sourceFiles sourcePatterns deps testPatterns testDeps =
5558 need sourceFilesFromPatterns
5659 testFiles <- getDirectoryFiles " " testPatterns
5760 need testFiles
58- cmd_ " cabal" " v2-test" " -O0" (name ++ " :tests" ) " --test-show-details=streaming"
61+ cmd_ " cabal" " v2-test" " -O0" (cabalName name ++ " :tests" ) " --test-show-details=streaming" ghcOptionFFI
5962 writeFile' out " "
6063
6164
@@ -64,11 +67,21 @@ cabalBinPath projectName opt =
6467 let
6568 version =
6669 case projectName of
67- " elm" -> " 0.8.5"
70+ " elm-format" -> " 0.8.5"
71+ " lamdera" -> " 0.19.1"
72+ " elm" -> " 0.19.1"
6873 _ -> " 0.0.0"
6974 in
70- " dist-newstyle/build" </> Shakefiles.Platform. cabalInstallOs </> " ghc-9.0.2" </> projectName ++ " -" ++ version </> " x" </> projectName </> opt </> " build" </> projectName </> projectName <.> exe
75+ -- dist-newstyle/build/aarch64-osx/ghc-9.0.2/elm-0.19.1/x/lamdera/opt/build/lamdera/lamdera
76+ " dist-newstyle/build" </> Shakefiles.Platform. cabalInstallOs </> " ghc-9.0.2" </> cabalName projectName ++ " -" ++ version </> " x" </> projectName </> opt </> " build" </> projectName </> projectName <.> exe
77+
7178
79+ cabalName :: String -> String
80+ cabalName projectName =
81+ case projectName of
82+ " lamdera" -> " elm"
83+ " elm" -> " elm"
84+ _ -> projectName
7285
7386executable :: FilePath -> String -> String -> Rules ()
7487executable target projectName gitDescribe =
0 commit comments