Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,335
Issues
4,335
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
370
Merge Requests
370
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
1ee62bf5
Commit
1ee62bf5
authored
May 11, 2018
by
Andrey Mokhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix redundant import, minor revision
parent
a161b8ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
15 deletions
+13
-15
src/Settings/Builders/Common.hs
src/Settings/Builders/Common.hs
+13
-15
No files found.
src/Settings/Builders/Common.hs
View file @
1ee62bf5
...
...
@@ -11,8 +11,7 @@ module Settings.Builders.Common (
import
Base
import
Expression
import
GHC.Packages
import
Hadrian.Haskell.Cabal.PackageData
as
PD
import
Hadrian.Haskell.Cabal.PackageData
import
Oracles.Flag
import
Oracles.Setting
import
Settings
...
...
@@ -23,22 +22,21 @@ cIncludeArgs = do
pkg
<-
getPackage
root
<-
getBuildRoot
path
<-
getBuildPath
incDirs
<-
getPackageData
PD
.
includeDirs
depDirs
<-
getPackageData
PD
.
depIncludeDirs
incDirs
<-
getPackageData
includeDirs
depDirs
<-
getPackageData
depIncludeDirs
iconvIncludeDir
<-
getSetting
IconvIncludeDir
gmpIncludeDir
<-
getSetting
GmpIncludeDir
ffiIncludeDir
<-
getSetting
FfiIncludeDir
mconcat
[
arg
"-Iincludes"
,
arg
$
"-I"
++
root
-/-
generatedDir
,
arg
$
"-I"
++
path
,
pure
.
map
(
"-I"
++
)
.
filter
(
/=
""
)
$
[
iconvIncludeDir
,
gmpIncludeDir
]
,
flag
UseSystemFfi
?
arg
(
"-I"
++
ffiIncludeDir
)
--
add the build path with include dirs in case we
generated
--
some files with autoconf, which will
end up in the build directory.
--
Add @incDirs@ in the build directory, since some files
generated
--
with @autoconf@ may
end up in the build directory.
,
pure
[
"-I"
++
path
-/-
dir
|
dir
<-
incDirs
]
--
add the package directory with include dirs, for includes
--
shipped with the package
--
Add @incDirs@ in the package directory for include files shipped
--
with the package.
,
pure
[
"-I"
++
pkgPath
pkg
-/-
dir
|
dir
<-
incDirs
]
,
pure
[
"-I"
++
unifyPath
dir
|
dir
<-
depDirs
]
]
...
...
@@ -58,12 +56,12 @@ cWarnings = mconcat
packageDatabaseArgs
::
Args
packageDatabaseArgs
=
do
stage
<-
getStage
dbPath
<-
expr
(
packageDbPath
stage
)
expr
(
need
[
dbPath
-/-
packageDbStamp
])
root
<-
getBuildRoot
prefix
<-
ifM
(
builder
Ghc
)
(
return
"-package-db "
)
(
return
"--package-db="
)
arg
$
prefix
++
root
-/-
relativePackageDbPath
stage
stage
<-
getStage
dbPath
<-
expr
(
packageDbPath
stage
)
expr
(
need
[
dbPath
-/-
packageDbStamp
])
root
<-
getBuildRoot
prefix
<-
ifM
(
builder
Ghc
)
(
return
"-package-db "
)
(
return
"--package-db="
)
arg
$
prefix
++
root
-/-
relativePackageDbPath
stage
bootPackageDatabaseArgs
::
Args
bootPackageDatabaseArgs
=
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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