Commits

Anonymous committed 74eb267

asmgen: changement signification option -S.
proc_sparc: appel du scheduler en place.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@127f963ae5c-01c2-4b8c-9fe0-0dff7051ff02

  • Participants
  • Parent commits a6342e1

Comments (0)

Files changed (2)

asmcomp/asmgen.ml

 
 let compile_implementation prefixname lam =
   let asmfile =
-    if !assembler_only then prefixname ^ ".s" else temp_file "camlasm" ".s" in
+    if !keep_asm_file then prefixname ^ ".s" else temp_file "camlasm" ".s" in
   let oc = open_out asmfile in
   begin try
     Emitaux.output_channel := oc;
     close_out oc
   with x ->
     close_out oc;
-    if !assembler_only then () else remove_file asmfile;
+    if !keep_asm_file then () else remove_file asmfile;
     raise x
   end;
-  if !assembler_only then () else begin
-    if Proc.assemble_file asmfile (prefixname ^ ".o") <> 0
-    then raise(Error(Assembler_error asmfile))
-    else remove_file asmfile
-  end
+  if Proc.assemble_file asmfile (prefixname ^ ".o") <> 0
+  then raise(Error(Assembler_error asmfile));
+  if !keep_asm_file then () else remove_file asmfile
 
 (* Error report *)
 

asmcomp/proc_sparc.ml

 (* Calling the assembler and the archiver *)
 
 let assemble_file infile outfile =
-  try
+  begin try
     let sched = find_in_path !Config.load_path "scheduler_sparc" in
-    Sys.command (sched ^ " -dl " ^ infile ^ " | as -o " ^ outfile ^ " -")
+    Sys.command (sched ^ " -dli " ^ infile)
   with Not_found ->
-    Sys.command ("as -o " ^ outfile ^ " " ^ infile)
+    ()
+  end;
+  Sys.command ("as -o " ^ outfile ^ " " ^ infile)
 
 let create_archive archive file_list =
   Misc.remove_file archive;