diff options
author | Ben.Lippmeier@anu.edu.au <unknown> | 2010-01-02 09:29:57 +0000 |
---|---|---|
committer | Ben.Lippmeier@anu.edu.au <unknown> | 2010-01-02 09:29:57 +0000 |
commit | e7ab9c680f945aa020fb0f685fc9d2ec29553558 (patch) | |
tree | f3e343d1a1eda8532f46b8df822fbe5c1f2aabe4 /compiler | |
parent | 572a047bcf7001a4a2b916cfec618082652f2ae6 (diff) | |
download | haskell-e7ab9c680f945aa020fb0f685fc9d2ec29553558.tar.gz |
When compiling viac, don't need to emit prototypes for symbols in the RTS
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/cmm/CLabel.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs index 4fd0d3a0fe..7c8fe85a34 100644 --- a/compiler/cmm/CLabel.hs +++ b/compiler/cmm/CLabel.hs @@ -596,7 +596,15 @@ needsCDecl ModuleRegdLabel = False needsCDecl (StringLitLabel _) = False needsCDecl (AsmTempLabel _) = False needsCDecl (RtsLabel _) = False -needsCDecl (CmmLabel _ _ _) = True + +needsCDecl (CmmLabel pkgId _ _) + -- Prototypes for labels defined in the runtime system are imported + -- into HC files via includes/Stg.h. + | pkgId == rtsPackageId = False + + -- For other labels we inline one into the HC file directly. + | otherwise = True + needsCDecl l@(ForeignLabel{}) = not (isMathFun l) needsCDecl (CC_Label _) = True needsCDecl (CCS_Label _) = True |