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
Environments
Terraform modules
Monitor
Incidents
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
Alexander Kaznacheev
GHC
Commits
8e43dc90
Commit
8e43dc90
authored
4 years ago
by
Matthew Pickering
Committed by
Marge Bot
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
hadrian: Update hsc2hs wrapper to match current master
parent
e4c25261
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hadrian/src/Rules/BinaryDist.hs
+5
-19
5 additions, 19 deletions
hadrian/src/Rules/BinaryDist.hs
with
5 additions
and
19 deletions
hadrian/src/Rules/BinaryDist.hs
+
5
−
19
View file @
8e43dc90
...
...
@@ -325,26 +325,12 @@ hsc2hsWrapper :: Action String
hsc2hsWrapper
=
do
ccArgs
<-
map
(
"--cflag="
<>
)
<$>
settingList
(
ConfCcArgs
Stage1
)
ldFlags
<-
map
(
"--lflag="
<>
)
<$>
settingList
(
ConfGccLinkerArgs
Stage1
)
wrapper
<-
drop
4
.
lines
<$>
liftIO
(
readFile
"utils/hsc2hs/hsc2hs.wrapper"
)
return
$
unlines
[
"HSC2HS_EXTRA=
\"
"
<>
unwords
ccArgs
<>
unwords
ldFlags
<>
"
\"
"
,
"tflag=
\"
--template=$libdir/template-hsc.h
\"
"
,
"Iflag=
\"
-I$includedir/
\"
"
,
"for arg do"
,
" case
\"
$arg
\"
in"
,
"# On OS X, we need to specify -m32 or -m64 in order to get gcc to"
,
"# build binaries for the right target. We do that by putting it in"
,
"# HSC2HS_EXTRA. When cabal runs hsc2hs, it passes a flag saying which"
,
"# gcc to use, so if we set HSC2HS_EXTRA= then we don't get binaries"
,
"# for the right platform. So for now we just don't set HSC2HS_EXTRA="
,
"# but we probably want to revisit how this works in the future."
,
"# -c*) HSC2HS_EXTRA=;;"
,
"# --cc=*) HSC2HS_EXTRA=;;"
,
" -t*) tflag=;;"
,
" --template=*) tflag=;;"
,
" --) break;;"
,
" esac"
,
"done"
,
"exec
\"
$executablename
\"
${tflag:+
\"
$tflag
\"
} $HSC2HS_EXTRA ${1+
\"
$@
\"
}
\"
$Iflag
\"
"
]
(
"HSC2HS_EXTRA=
\"
"
<>
unwords
ccArgs
<>
unwords
ldFlags
<>
"
\"
"
:
"tflag=
\"
--template=$libdir/template-hsc.h
\"
"
:
"Iflag=
\"
-I$includedir/
\"
"
:
wrapper
)
runGhcWrapper
::
Action
String
runGhcWrapper
=
pure
$
"exec
\"
$executablename
\"
-f
\"
$exedir/ghc
\"
${1+
\"
$@
\"
}
\n
"
...
...
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