aboutsummaryrefslogtreecommitdiffstats
path: root/driver/Linker.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2016-07-19 09:44:26 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2016-07-19 09:44:26 +0200
commit2129fe8f2e19c4dd91955e5300e76d924e0a3e6d (patch)
tree142db2c4fd4931dc7b2d6cfb1bf77e8f4e5ec584 /driver/Linker.ml
parentefa462bd1655c6b2c8f064e214762650092257e8 (diff)
downloadcompcert-2129fe8f2e19c4dd91955e5300e76d924e0a3e6d.tar.gz
compcert-2129fe8f2e19c4dd91955e5300e76d924e0a3e6d.zip
Merged responfile function into command.
Command now decides whether to use a responsefile or call the external command directly. Bug 18004
Diffstat (limited to 'driver/Linker.ml')
-rw-r--r--driver/Linker.ml9
1 files changed, 2 insertions, 7 deletions
diff --git a/driver/Linker.ml b/driver/Linker.ml
index 14c9bcb3..305c5603 100644
--- a/driver/Linker.ml
+++ b/driver/Linker.ml
@@ -19,19 +19,14 @@ open Driveraux
(* Linking *)
let linker exe_name files =
- let cmd,opts = match Configuration.linker with
- | name::opts -> name,opts
- | [] -> assert false (* Should be catched in Configuration *) in
- let opts = List.concat [
- opts;
+ let cmd = List.concat [
+ Configuration.linker;
["-o"; exe_name];
files;
(if Configuration.has_runtime_lib
then ["-L" ^ !stdlib_path; "-lcompcert"]
else [])
] in
- let opts = responsefile opts (fun a -> if gnu_system then ["@"^a] else ["-@"^a]) in
- let cmd = cmd::opts in
let exc = command cmd in
if exc <> 0 then begin
command_error "linker" exc;