Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
166e1c2a
Commit
166e1c2a
authored
Oct 08, 2019
by
Stefan Schulze Frielinghaus
Committed by
Marge Bot
Oct 11, 2019
Browse files
Hadrian: Take care of assembler source files
Fixes
#17286
.
parent
30f5ac07
Pipeline
#11280
failed with stages
in 882 minutes and 12 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
hadrian/src/Rules/Compile.hs
View file @
166e1c2a
...
...
@@ -41,6 +41,9 @@ compilePackage rs = do
[
root
-/-
"**/build/s/**/*."
++
wayPat
++
"o"
|
wayPat
<-
wayPats
]
|%>
compileNonHsObject
rs
Asm
[
root
-/-
"**/build/S/**/*."
++
wayPat
++
"o"
|
wayPat
<-
wayPats
]
|%>
compileNonHsObject
rs
Asm
-- All else is haskell.
-- This comes last as it overlaps with the above rules' file patterns.
forM_
((,)
<$>
hsExts
<*>
wayPats
)
$
\
((
oExt
,
hiExt
),
wayPat
)
->
...
...
hadrian/src/Rules/Library.hs
View file @
166e1c2a
...
...
@@ -112,11 +112,13 @@ allObjects context = (++) <$> nonHsObjects context <*> hsObjects context
-- (object files built from C, C-- and sometimes other things).
nonHsObjects
::
Context
->
Action
[
FilePath
]
nonHsObjects
context
=
do
asmSrcs
<-
interpretInContext
context
(
getContextData
asmSrcs
)
asmObjs
<-
mapM
(
objectPath
context
)
asmSrcs
cObjs
<-
cObjects
context
cmmSrcs
<-
interpretInContext
context
(
getContextData
cmmSrcs
)
cmmObjs
<-
mapM
(
objectPath
context
)
cmmSrcs
eObjs
<-
extraObjects
context
return
$
cObjs
++
cmmObjs
++
eObjs
return
$
asmObjs
++
cObjs
++
cmmObjs
++
eObjs
-- | Return all the C object files needed to build the given library context.
cObjects
::
Context
->
Action
[
FilePath
]
...
...
hadrian/src/Rules/Program.hs
View file @
166e1c2a
...
...
@@ -114,10 +114,12 @@ buildBinary rs bin context@Context {..} = do
when
(
stage
>
Stage0
)
$
do
ways
<-
interpretInContext
context
(
getLibraryWays
<>
getRtsWays
)
needLibrary
[
(
rtsContext
stage
)
{
way
=
w
}
|
w
<-
ways
]
cSrcs
<-
interpretInContext
context
(
getContextData
cSrcs
)
cObjs
<-
mapM
(
objectPath
context
)
cSrcs
hsObjs
<-
hsObjects
context
let
binDeps
=
cObjs
++
hsObjs
asmSrcs
<-
interpretInContext
context
(
getContextData
asmSrcs
)
asmObjs
<-
mapM
(
objectPath
context
)
asmSrcs
cSrcs
<-
interpretInContext
context
(
getContextData
cSrcs
)
cObjs
<-
mapM
(
objectPath
context
)
cSrcs
hsObjs
<-
hsObjects
context
let
binDeps
=
asmObjs
++
cObjs
++
hsObjs
need
binDeps
buildWithResources
rs
$
target
context
(
Ghc
LinkHs
stage
)
binDeps
[
bin
]
synopsis
<-
pkgSynopsis
package
...
...
Marge Bot
💬
@marge-bot
mentioned in merge request
!1909 (closed)
·
Oct 12, 2019
mentioned in merge request
!1909 (closed)
mentioned in merge request !1909
Toggle commit list
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment