Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository 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
Glasgow Haskell Compiler
Packages
Cabal
Commits
2d5ccc6a
Commit
2d5ccc6a
authored
7 years ago
by
Moritz Angermann
Browse files
Options
Downloads
Patches
Plain Diff
generic lib names
parent
4a287659
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Cabal/Distribution/Simple/BuildPaths.hs
+15
-7
15 additions, 7 deletions
Cabal/Distribution/Simple/BuildPaths.hs
with
15 additions
and
7 deletions
Cabal/Distribution/Simple/BuildPaths.hs
+
15
−
7
View file @
2d5ccc6a
...
...
@@ -25,8 +25,10 @@ module Distribution.Simple.BuildPaths (
cppHeaderName
,
haddockName
,
mkGenericStaticLibName
,
mkLibName
,
mkProfLibName
,
mkGenericSharedLibName
,
mkSharedLibName
,
mkStaticLibName
,
...
...
@@ -183,21 +185,27 @@ flibBuildDir lbi flib = buildDir lbi </> nm </> nm ++ "-tmp"
-- ---------------------------------------------------------------------------
-- Library file names
-- TODO: Should this use staticLibExtension?
mkGenericStaticLibName
::
String
->
String
mkGenericStaticLibName
lib
=
"lib"
++
lib
<.>
staticLibExtension
mkLibName
::
UnitId
->
String
mkLibName
lib
=
"lib"
++
getHSLibraryName
lib
<.>
"a"
mkLibName
lib
=
mkGenericStaticLibName
(
getHSLibraryName
lib
)
-- TODO: Should this use staticLibExtension?
mkProfLibName
::
UnitId
->
String
mkProfLibName
lib
=
"lib"
++
getHSLibraryName
lib
++
"_p"
<.>
"a"
mkProfLibName
lib
=
mkGenericStaticLibName
(
getHSLibraryName
lib
++
"_p"
)
mkGenericSharedLibName
::
CompilerId
->
String
->
String
mkGenericSharedLibName
(
CompilerId
compilerFlavor
compilerVersion
)
lib
=
mconcat
[
"lib"
,
lib
,
"-"
,
comp
<.>
dllExtension
]
where
comp
=
display
compilerFlavor
++
display
compilerVersion
-- Implement proper name mangling for dynamical shared objects
-- libHS<packagename>-<compilerFlavour><compilerVersion>
-- e.g. libHSbase-2.1-ghc6.6.1.so
mkSharedLibName
::
CompilerId
->
UnitId
->
String
mkSharedLibName
(
CompilerId
compilerFlavor
compilerVersion
)
lib
=
"lib"
++
getHSLibraryName
lib
++
"-"
++
comp
<.>
dllExtension
where
comp
=
display
compilerFlavor
++
display
compilerVersion
mkSharedLibName
comp
lib
=
mkGenericSharedLibName
comp
(
getHSLibraryName
lib
)
-- Static libs are named the same as shared libraries, only with
-- a different extension.
...
...
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