Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
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 (
...
@@ -11,8 +11,7 @@ module Settings.Builders.Common (
import
Base
import
Base
import
Expression
import
Expression
import
GHC.Packages
import
Hadrian.Haskell.Cabal.PackageData
import
Hadrian.Haskell.Cabal.PackageData
as
PD
import
Oracles.Flag
import
Oracles.Flag
import
Oracles.Setting
import
Oracles.Setting
import
Settings
import
Settings
...
@@ -23,22 +22,21 @@ cIncludeArgs = do
...
@@ -23,22 +22,21 @@ cIncludeArgs = do
pkg
<-
getPackage
pkg
<-
getPackage
root
<-
getBuildRoot
root
<-
getBuildRoot
path
<-
getBuildPath
path
<-
getBuildPath
incDirs
<-
getPackageData
PD
.
includeDirs
incDirs
<-
getPackageData
includeDirs
depDirs
<-
getPackageData
PD
.
depIncludeDirs
depDirs
<-
getPackageData
depIncludeDirs
iconvIncludeDir
<-
getSetting
IconvIncludeDir
iconvIncludeDir
<-
getSetting
IconvIncludeDir
gmpIncludeDir
<-
getSetting
GmpIncludeDir
gmpIncludeDir
<-
getSetting
GmpIncludeDir
ffiIncludeDir
<-
getSetting
FfiIncludeDir
ffiIncludeDir
<-
getSetting
FfiIncludeDir
mconcat
[
arg
"-Iincludes"
mconcat
[
arg
"-Iincludes"
,
arg
$
"-I"
++
root
-/-
generatedDir
,
arg
$
"-I"
++
root
-/-
generatedDir
,
arg
$
"-I"
++
path
,
arg
$
"-I"
++
path
,
pure
.
map
(
"-I"
++
)
.
filter
(
/=
""
)
$
[
iconvIncludeDir
,
gmpIncludeDir
]
,
pure
.
map
(
"-I"
++
)
.
filter
(
/=
""
)
$
[
iconvIncludeDir
,
gmpIncludeDir
]
,
flag
UseSystemFfi
?
arg
(
"-I"
++
ffiIncludeDir
)
,
flag
UseSystemFfi
?
arg
(
"-I"
++
ffiIncludeDir
)
--
a
dd
the build path with include dirs in case we
generated
--
A
dd
@incDirs@ in the build directory, since some files
generated
--
some files
with autoconf
, which will
end up in the build directory.
-- with
@
autoconf
@ may
end up in the build directory.
,
pure
[
"-I"
++
path
-/-
dir
|
dir
<-
incDirs
]
,
pure
[
"-I"
++
path
-/-
dir
|
dir
<-
incDirs
]
--
a
dd the package directory
with
include
dirs, for includes
--
A
dd
@incDirs@ in
the package directory
for
include
files shipped
--
shipped
with the package
-- with the package
.
,
pure
[
"-I"
++
pkgPath
pkg
-/-
dir
|
dir
<-
incDirs
]
,
pure
[
"-I"
++
pkgPath
pkg
-/-
dir
|
dir
<-
incDirs
]
,
pure
[
"-I"
++
unifyPath
dir
|
dir
<-
depDirs
]
]
,
pure
[
"-I"
++
unifyPath
dir
|
dir
<-
depDirs
]
]
...
@@ -58,12 +56,12 @@ cWarnings = mconcat
...
@@ -58,12 +56,12 @@ cWarnings = mconcat
packageDatabaseArgs
::
Args
packageDatabaseArgs
::
Args
packageDatabaseArgs
=
do
packageDatabaseArgs
=
do
stage
<-
getStage
stage
<-
getStage
dbPath
<-
expr
(
packageDbPath
stage
)
dbPath
<-
expr
(
packageDbPath
stage
)
expr
(
need
[
dbPath
-/-
packageDbStamp
])
expr
(
need
[
dbPath
-/-
packageDbStamp
])
root
<-
getBuildRoot
root
<-
getBuildRoot
prefix
<-
ifM
(
builder
Ghc
)
(
return
"-package-db "
)
(
return
"--package-db="
)
prefix
<-
ifM
(
builder
Ghc
)
(
return
"-package-db "
)
(
return
"--package-db="
)
arg
$
prefix
++
root
-/-
relativePackageDbPath
stage
arg
$
prefix
++
root
-/-
relativePackageDbPath
stage
bootPackageDatabaseArgs
::
Args
bootPackageDatabaseArgs
::
Args
bootPackageDatabaseArgs
=
do
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