Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reinier Maas
GHC
Commits
bde4b5d4
Commit
bde4b5d4
authored
1 year ago
by
Rodrigo Mesquita
Committed by
Marge Bot
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Improve handling of Cc as a fallback
parent
294a6d80
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
utils/ghc-toolchain/src/GHC/Toolchain/Tools/Cpp.hs
+4
-4
4 additions, 4 deletions
utils/ghc-toolchain/src/GHC/Toolchain/Tools/Cpp.hs
utils/ghc-toolchain/src/GHC/Toolchain/Tools/Link.hs
+2
-2
2 additions, 2 deletions
utils/ghc-toolchain/src/GHC/Toolchain/Tools/Link.hs
with
6 additions
and
6 deletions
utils/ghc-toolchain/src/GHC/Toolchain/Tools/Cpp.hs
+
4
−
4
View file @
bde4b5d4
...
...
@@ -24,8 +24,8 @@ newtype HsCpp = HsCpp { hsCppProgram :: Program
findHsCpp
::
ProgOpt
->
Cc
->
M
HsCpp
findHsCpp
progOpt
cc
=
checking
"for Haskell C preprocessor"
$
do
-- Use the specified HS CPP or try to
find one (candidate is
the c compiler
)
foundHsCppProg
<-
findProgram
"Haskell C preprocessor"
progOpt
[
takeFileName
$
prgPath
$
ccProgram
cc
]
-- Use the specified HS CPP or try to
use
the c compiler
foundHsCppProg
<-
findProgram
"Haskell C preprocessor"
progOpt
[
]
<|>
pure
(
Program
(
prgPath
$
ccProgram
cc
)
[]
)
case
poFlags
progOpt
of
-- If the user specified HS CPP flags don't second-guess them
Just
_
->
return
HsCpp
{
hsCppProgram
=
foundHsCppProg
}
...
...
@@ -84,8 +84,8 @@ findHsCppArgs cpp = withTempDir $ \dir -> do
findCpp
::
ProgOpt
->
Cc
->
M
Cpp
findCpp
progOpt
cc
=
checking
"for C preprocessor"
$
do
-- Use the specified CPP or try to
find one (candidate is
the c compiler
)
foundCppProg
<-
findProgram
"C preprocessor"
progOpt
[
prgPath
$
ccProgram
cc
]
-- Use the specified CPP or try to
use
the c compiler
foundCppProg
<-
findProgram
"C preprocessor"
progOpt
[
]
<|>
pure
(
Program
(
prgPath
$
ccProgram
cc
)
[]
)
case
poFlags
progOpt
of
-- If the user specified CPP flags don't second-guess them
Just
_
->
return
Cpp
{
cppProgram
=
foundCppProg
}
...
...
This diff is collapsed.
Click to expand it.
utils/ghc-toolchain/src/GHC/Toolchain/Tools/Link.hs
+
2
−
2
View file @
bde4b5d4
...
...
@@ -46,8 +46,8 @@ findCcLink :: String -- ^ The llvm target to use if CcLink supports --target
->
Bool
-- ^ Whether we should search for a more efficient linker
->
ArchOS
->
Cc
->
Maybe
Readelf
->
M
CcLink
findCcLink
target
progOpt
ldOverride
archOs
cc
readelf
=
checking
"for C compiler for linking command"
$
do
-- Use the specified linker or try
to find one
rawCcLink
<-
findProgram
"C compiler for linking"
progOpt
[
takeFileName
$
prgPath
$
ccProgram
cc
]
-- Use the specified linker or try
using the C compiler
rawCcLink
<-
findProgram
"C compiler for linking"
progOpt
[
]
<|>
pure
(
Program
(
prgPath
$
ccProgram
cc
)
[]
)
ccLinkProgram
<-
case
poFlags
progOpt
of
Just
_
->
-- If the user specified linker flags don't second-guess them
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment