summaryrefslogtreecommitdiff
path: root/hadrian/src/Rules/Library.hs
diff options
context:
space:
mode:
Diffstat (limited to 'hadrian/src/Rules/Library.hs')
-rw-r--r--hadrian/src/Rules/Library.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/hadrian/src/Rules/Library.hs b/hadrian/src/Rules/Library.hs
index 4b9d7d6235..c67346f5d6 100644
--- a/hadrian/src/Rules/Library.hs
+++ b/hadrian/src/Rules/Library.hs
@@ -117,10 +117,17 @@ nonHsObjects context = do
asmSrcs <- interpretInContext context (getContextData asmSrcs)
asmObjs <- mapM (objectPath context) asmSrcs
cObjs <- cObjects context
+ cxxObjs <- cxxObjects context
cmmSrcs <- interpretInContext context (getContextData cmmSrcs)
cmmObjs <- mapM (objectPath context) cmmSrcs
eObjs <- extraObjects context
- return $ asmObjs ++ cObjs ++ cmmObjs ++ eObjs
+ return $ asmObjs ++ cObjs ++ cxxObjs ++ cmmObjs ++ eObjs
+
+-- | Return all the Cxx object files needed to build the given library context.
+cxxObjects :: Context -> Action [FilePath]
+cxxObjects context = do
+ srcs <- interpretInContext context (getContextData cxxSrcs)
+ mapM (objectPath context) srcs
-- | Return all the C object files needed to build the given library context.
cObjects :: Context -> Action [FilePath]