Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
2c77e092
Commit
2c77e092
authored
May 20, 2009
by
Ian Lynagh
Browse files
Use machdepCCOpts when running "as"
parent
e5bc09bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/main/DriverPipeline.hs
View file @
2c77e092
...
...
@@ -1111,6 +1111,7 @@ runPhase As _stop hsc_env _basename _suff input_fn get_output_fn maybe_loc
-- might be a hierarchical module.
createDirectoryHierarchy
(
takeDirectory
output_fn
)
let
(
md_c_flags
,
_
)
=
machdepCCOpts
dflags
SysTools
.
runAs
dflags
(
map
SysTools
.
Option
as_opts
++
[
SysTools
.
Option
(
"-I"
++
p
)
|
p
<-
cmdline_include_paths
]
...
...
@@ -1128,7 +1129,8 @@ runPhase As _stop hsc_env _basename _suff input_fn get_output_fn maybe_loc
,
SysTools
.
FileOption
""
input_fn
,
SysTools
.
Option
"-o"
,
SysTools
.
FileOption
""
output_fn
])
]
++
map
SysTools
.
Option
md_c_flags
)
return
(
StopLn
,
dflags
,
maybe_loc
,
output_fn
)
...
...
@@ -1159,6 +1161,7 @@ runPhase SplitAs _stop hsc_env _basename _suff _input_fn get_output_fn maybe_loc
split_obj
n
=
split_odir
</>
takeFileName
base_o
++
"__"
++
show
n
<.>
osuf
let
(
md_c_flags
,
_
)
=
machdepCCOpts
dflags
let
assemble_file
n
=
SysTools
.
runAs
dflags
(
map
SysTools
.
Option
as_opts
++
...
...
@@ -1176,7 +1179,8 @@ runPhase SplitAs _stop hsc_env _basename _suff _input_fn get_output_fn maybe_loc
,
SysTools
.
Option
"-o"
,
SysTools
.
FileOption
""
(
split_obj
n
)
,
SysTools
.
FileOption
""
(
split_s
n
)
])
]
++
map
SysTools
.
Option
md_c_flags
)
mapM_
assemble_file
[
1
..
n
]
...
...
@@ -1187,7 +1191,9 @@ runPhase SplitAs _stop hsc_env _basename _suff _input_fn get_output_fn maybe_loc
SysTools
.
Option
"-Wl,-r"
,
SysTools
.
Option
ld_x_flag
,
SysTools
.
Option
"-o"
,
SysTools
.
FileOption
""
output_fn
]
++
args
)
SysTools
.
FileOption
""
output_fn
]
++
map
SysTools
.
Option
md_c_flags
++
args
)
ld_x_flag
|
null
cLD_X
=
""
|
otherwise
=
"-Wl,-x"
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment