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
d1699f9a
Commit
d1699f9a
authored
11 years ago
by
Austin Seipp
Committed by
thoughtpolice
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Add comments explaining #8754"
This reverts commit
b626c3d4
. (cherry picked from commit
642bba34
)
parent
298dbfa5
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
ghc/Main.hs
+1
-20
1 addition, 20 deletions
ghc/Main.hs
with
1 addition
and
20 deletions
ghc/Main.hs
+
1
−
20
View file @
d1699f9a
...
...
@@ -77,7 +77,7 @@ import Data.Maybe
main
::
IO
()
main
=
do
defaultsHook
-- See Note [-Bsymbolic and hooks]
defaultsHook
hSetBuffering
stdout
LineBuffering
hSetBuffering
stderr
LineBuffering
GHC
.
defaultErrorHandler
defaultFatalMessager
defaultFlushOut
$
do
...
...
@@ -821,23 +821,4 @@ unknownFlagsErr fs = throwGhcException $ UsageError $ concatMap oneError fs
[]
->
""
suggs
->
"did you mean one of:
\n
"
++
unlines
(
map
(
" "
++
)
suggs
))
{- Note [-Bsymbolic and hooks]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Bsymbolic is a flag that prevents the binding of references to global
symbols to symbols outside the shared library being compiled (see `man
ld`). When dynamically linking, we don't use -Bsymbolic on the RTS
package: that is because we want hooks to be overridden by the user,
we don't want to constrain them to the RTS package.
Unfortunately this seems to have broken somehow on OS X: as a result,
defaultHooks (in hschooks.c) is not called, which does not initialize
the GC stats. As a result, this breaks things like `:set +s` in GHCi
(#8754). As a hacky workaround, we instead call 'defaultHooks'
directly to initalize the flags in the RTS.
A biproduct of this, I believe, is that hooks are likely broken on OS
X when dynamically linking. But this probably doesn't affect most
people since we're linking GHC dynamically, but most things themselves
link statically.
-}
foreign
import
ccall
safe
"defaultsHook"
defaultsHook
::
IO
()
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