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
Iterations
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
Container 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
haskell-wasm
GHC
Commits
ca0b4b50
Commit
ca0b4b50
authored
3 months ago
by
Cheng Shao
Browse files
Options
Downloads
Patches
Plain Diff
hadrian: so-mutex
(cherry picked from commit
c35281f9
)
parent
928929db
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/Library.hs
+7
-6
7 additions, 6 deletions
hadrian/src/Rules/Library.hs
with
7 additions
and
6 deletions
hadrian/src/Rules/Library.hs
+
7
−
6
View file @
ca0b4b50
...
...
@@ -24,10 +24,11 @@ import Oracles.Flag
libraryRules
::
Rules
()
libraryRules
=
do
soMutex
<-
newResource
"so-mutex"
1
root
<-
buildRootRules
root
-/-
"**/libHS*-*.dylib"
%>
buildDynamicLib
root
"dylib"
root
-/-
"**/libHS*-*.so"
%>
buildDynamicLib
root
"so"
root
-/-
"**/libHS*-*.dll"
%>
buildDynamicLib
root
"dll"
root
-/-
"**/libHS*-*.dylib"
%>
buildDynamicLib
[(
soMutex
,
1
)]
root
"dylib"
root
-/-
"**/libHS*-*.so"
%>
buildDynamicLib
[(
soMutex
,
1
)]
root
"so"
root
-/-
"**/libHS*-*.dll"
%>
buildDynamicLib
[(
soMutex
,
1
)]
root
"dll"
root
-/-
"**/*.a"
%>
buildStaticLib
root
root
-/-
"**/stamp-*"
%>
buildPackage
root
priority
2
$
do
...
...
@@ -85,14 +86,14 @@ registerDynamicLib root suffix dynlibpath = do
-- | Build a dynamic library ('LibDyn') under the given build root, with the
-- given suffix (@.so@ or @.dylib@, @.dll@), where the complete path of the
-- archive to build is given as the third argument.
buildDynamicLib
::
FilePath
->
String
->
FilePath
->
Action
()
buildDynamicLib
root
suffix
dynlibpath
=
do
buildDynamicLib
::
[(
Resource
,
Int
)]
->
FilePath
->
String
->
FilePath
->
Action
()
buildDynamicLib
rs
root
suffix
dynlibpath
=
do
dynlib
<-
parsePath
(
parseBuildLibDyn
root
suffix
)
"<dyn lib parser>"
dynlibpath
let
context
=
libDynContext
dynlib
deps
<-
contextDependencies
context
registerPackages
deps
objs
<-
libraryObjects
context
build
$
target
context
(
Ghc
LinkHs
$
Context
.
stage
context
)
objs
[
dynlibpath
]
build
WithResources
rs
$
target
context
(
Ghc
LinkHs
$
Context
.
stage
context
)
objs
[
dynlibpath
]
-- | Build a "GHCi library" ('LibGhci') under the given build root, with the
-- complete path of the file to build is given as the second argument.
...
...
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