~ubuntu-branches/debian/sid/ocaml/sid

« back to all changes in this revision

Viewing changes to bytecomp/bytelink.ml

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu
  • Date: 2011-05-25 07:40:01 UTC
  • mfrom: (12.1.15 sid)
  • Revision ID: james.westby@ubuntu.com-20110525074001-cxo449ibv0fkjlho
* Provide a way to use legacy custom linking (Closes: #627761)
* Document Debian-specific -custom behaviour in README.Debian
* Properly initialize executable name in caml_startup_code
  (Closes: #627756)

Show diffs side-by-side

added added

removed removed

Lines of Context:
514
514
      if String.contains name '.' then name else name ^ ".exe"
515
515
  | _ -> name
516
516
 
 
517
(* Legacy custom behaviour (Debian-specific) *)
 
518
 
 
519
let legacy_custom =
 
520
  try String.contains (Sys.getenv "OCAML_COMPAT") 'c' with Not_found -> false
 
521
 
517
522
(* Main entry point (build a custom runtime if needed) *)
518
523
 
519
524
let link objfiles output_name =
527
532
  Clflags.dllibs := !lib_dllibs @ !Clflags.dllibs; (* put user's DLLs first *)
528
533
  if not !Clflags.custom_runtime then
529
534
    link_bytecode tolink output_name true
530
 
  else if not !Clflags.output_c_object && not !Clflags.make_runtime then
 
535
  else if not legacy_custom && not !Clflags.output_c_object && not !Clflags.make_runtime then
531
536
    let c_file = Filename.temp_file "camlobj" ".c" in
532
537
    try
533
538
      link_bytecode_as_c tolink c_file true;