Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
4a4b87de
Commit
4a4b87de
authored
Jan 12, 2005
by
simonmar
Browse files
[project @ 2005-01-12 13:36:30 by simonmar]
Restore splitting at ':' for the -i option, which I broke recently.
parent
443a09fb
Changes
3
Show whitespace changes
Inline
Side-by-side
ghc/compiler/Makefile
View file @
4a4b87de
...
@@ -190,7 +190,6 @@ $(CONFIG_HS) : $(FPTOOLS_TOP)/mk/config.mk Makefile
...
@@ -190,7 +190,6 @@ $(CONFIG_HS) : $(FPTOOLS_TOP)/mk/config.mk Makefile
@
echo
"cProjectPatchLevel =
\"
$(ProjectPatchLevel)
\"
"
>>
$(CONFIG_HS)
@
echo
"cProjectPatchLevel =
\"
$(ProjectPatchLevel)
\"
"
>>
$(CONFIG_HS)
@
echo
"cBooterVersion =
\"
$(GhcVersion)
\"
"
>>
$(CONFIG_HS)
@
echo
"cBooterVersion =
\"
$(GhcVersion)
\"
"
>>
$(CONFIG_HS)
@
echo
"cHscIfaceFileVersion =
\"
$(HscIfaceFileVersion)
\"
"
>>
$(CONFIG_HS)
@
echo
"cHscIfaceFileVersion =
\"
$(HscIfaceFileVersion)
\"
"
>>
$(CONFIG_HS)
@
echo
"cHOSTPLATFORM =
\"
$(HOSTPLATFORM)
\"
"
>>
$(CONFIG_HS)
@
echo
"cTARGETPLATFORM =
\"
$(TARGETPLATFORM)
\"
"
>>
$(CONFIG_HS)
@
echo
"cTARGETPLATFORM =
\"
$(TARGETPLATFORM)
\"
"
>>
$(CONFIG_HS)
@
echo
"cTARGETOS =
\"
$(TargetOS_CPP)
\"
"
>>
$(CONFIG_HS)
@
echo
"cTARGETOS =
\"
$(TargetOS_CPP)
\"
"
>>
$(CONFIG_HS)
@
echo
"cTARGETARCH =
\"
$(TargetArch_CPP)
\"
"
>>
$(CONFIG_HS)
@
echo
"cTARGETARCH =
\"
$(TargetArch_CPP)
\"
"
>>
$(CONFIG_HS)
...
...
ghc/compiler/main/DriverFlags.hs
View file @
4a4b87de
...
@@ -543,7 +543,9 @@ ignorePackage p =
...
@@ -543,7 +543,9 @@ ignorePackage p =
-- -i on its own deletes the import paths
-- -i on its own deletes the import paths
addImportPath
""
=
updDynFlags
(
\
s
->
s
{
importPaths
=
[]
})
addImportPath
""
=
updDynFlags
(
\
s
->
s
{
importPaths
=
[]
})
addImportPath
p
=
updDynFlags
(
\
s
->
s
{
importPaths
=
p
:
importPaths
s
})
addImportPath
p
=
do
paths
<-
splitPathList
p
updDynFlags
(
\
s
->
s
{
importPaths
=
importPaths
s
++
paths
})
-- we can only switch between HscC, HscAsmm, and HscILX with dynamic flags
-- we can only switch between HscC, HscAsmm, and HscILX with dynamic flags
-- (-fvia-C, -fasm, -filx respectively).
-- (-fvia-C, -fasm, -filx respectively).
...
...
ghc/compiler/main/DriverState.hs
View file @
4a4b87de
...
@@ -205,21 +205,20 @@ GLOBAL_VAR(v_Framework_paths, [], [String])
...
@@ -205,21 +205,20 @@ GLOBAL_VAR(v_Framework_paths, [], [String])
GLOBAL_VAR
(
v_Cmdline_frameworks
,
[]
,
[
String
])
GLOBAL_VAR
(
v_Cmdline_frameworks
,
[]
,
[
String
])
#
endif
#
endif
addToOrDeleteDirList
::
IORef
[
String
]
->
String
->
IO
()
addToOrDeleteDirList
ref
""
=
writeIORef
ref
[]
addToOrDeleteDirList
ref
path
=
addToDirList
ref
path
addToDirList
::
IORef
[
String
]
->
String
->
IO
()
addToDirList
::
IORef
[
String
]
->
String
->
IO
()
addToDirList
ref
path
addToDirList
ref
path
=
do
paths
<-
readIORef
ref
=
do
paths
<-
readIORef
ref
shiny_new_ones
<-
splitUp
path
shiny_new_ones
<-
splitPathList
path
writeIORef
ref
(
paths
++
filter
notNull
shiny_new_ones
)
writeIORef
ref
(
paths
++
shiny_new_ones
)
splitPathList
::
String
->
IO
[
String
]
splitPathList
s
=
do
ps
<-
splitUp
s
;
return
(
filter
notNull
ps
)
-- empty paths are ignored: there might be a trailing
-- empty paths are ignored: there might be a trailing
-- ':' in the initial list, for example. Empty paths can
-- ':' in the initial list, for example. Empty paths can
-- cause confusion when they are translated into -I options
-- cause confusion when they are translated into -I options
-- for passing to gcc.
-- for passing to gcc.
where
where
splitUp
::
String
->
IO
[
String
]
#
ifdef
mingw32_TARGET_OS
#
ifdef
mingw32_TARGET_OS
-- 'hybrid' support for DOS-style paths in directory lists.
-- 'hybrid' support for DOS-style paths in directory lists.
--
--
...
...
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