Enable to (old) -dlcode option by default. -nodynlink disables it.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8916 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
4a2a6b8aac
commit
20bc66eb25
4
Changes
4
Changes
|
@ -19,8 +19,8 @@ Compilers:
|
|||
Native-code compiler:
|
||||
- A new option "-shared" to produce a plugin that can be dynamically
|
||||
loaded with the native version of Dynlink.
|
||||
- A new option "-dlcode" to produce code that can be put in a plugin (needed
|
||||
for some platforms only).
|
||||
- A new option "-nodynlink" to enable optimizations valid only for code
|
||||
that is never dynlinked (no-op except for AMD64).
|
||||
|
||||
Standard library:
|
||||
- Printexc library: new functions "print_backtrace" and "get_backtrace"
|
||||
|
|
|
@ -89,15 +89,6 @@ let show_config () =
|
|||
;;
|
||||
|
||||
let main () =
|
||||
(* This is a temporary solution to help the community evaluate
|
||||
the impact of -dlcode on performance for AMD64 systems (so that
|
||||
3rd-party libraries can be recompiled with -dlcode without touching
|
||||
their Makefiles). *)
|
||||
begin
|
||||
try if Sys.getenv "OCAML_DLCODE" <> "" then dlcode := true
|
||||
with Not_found -> ();
|
||||
end;
|
||||
|
||||
native_code := true;
|
||||
c_compiler := Config.native_c_compiler;
|
||||
let ppf = Format.err_formatter in
|
||||
|
@ -118,8 +109,6 @@ let main () =
|
|||
" Optimize code size rather than speed";
|
||||
"-config", Arg.Unit show_config,
|
||||
" print configuration values and exit";
|
||||
"-dlcode", Arg.Set dlcode,
|
||||
" Compile into code that can be dynlinked";
|
||||
"-dtypes", Arg.Set annotations,
|
||||
" (deprecated) same as -annot";
|
||||
"-for-pack", Arg.String (fun s -> for_package := Some s),
|
||||
|
@ -147,6 +136,8 @@ let main () =
|
|||
"-noassert", Arg.Set noassert, " Don't compile assertion checks";
|
||||
"-noautolink", Arg.Set no_auto_link,
|
||||
" Don't automatically link C libraries specified in .cmxa files";
|
||||
"-nodynlink", Arg.Clear dlcode,
|
||||
" Enable optimizations for code that will not be dynlinked";
|
||||
"-nolabels", Arg.Set classic, " Ignore non-optional labels in types";
|
||||
"-nostdlib", Arg.Set no_std_include,
|
||||
" do not add standard directory to the list of include directories";
|
||||
|
|
|
@ -84,7 +84,7 @@ clean:: partialclean
|
|||
$(CAMLC) -c $(COMPFLAGS) $<
|
||||
|
||||
.ml.cmx:
|
||||
$(CAMLOPT) -dlcode -c $(COMPFLAGS) $<
|
||||
$(CAMLOPT) -c $(COMPFLAGS) $<
|
||||
|
||||
.c.$(O):
|
||||
$(BYTECC) $(BYTECCCOMPOPTS) $(CFLAGS) -c $<
|
||||
|
|
|
@ -99,7 +99,7 @@ installopt:
|
|||
$(CAMLC) -c $(COMPFLAGS) $<
|
||||
|
||||
.ml.cmx:
|
||||
$(CAMLOPT) -dlcode -c $(COMPFLAGS) $<
|
||||
$(CAMLOPT) -c $(COMPFLAGS) $<
|
||||
|
||||
depend: $(GENFILES)
|
||||
-gcc -MM -I../../byterun *.c > .depend
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
include ../../config/Makefile
|
||||
|
||||
CAMLOPT=../../boot/ocamlrun ../../ocamlopt -thread -dlcode
|
||||
SUBCAMLOPT=../../../boot/ocamlrun ../../../ocamlopt -dlcode
|
||||
CAMLOPT=../../boot/ocamlrun ../../ocamlopt -thread
|
||||
SUBCAMLOPT=../../../boot/ocamlrun ../../../ocamlopt
|
||||
COMPFLAGS=
|
||||
#SHARED=-shared -closed -S -dstartup
|
||||
#SHARED=-shared
|
||||
|
|
|
@ -89,5 +89,5 @@ let std_include_dir () =
|
|||
;;
|
||||
|
||||
let shared = ref false (* -shared *)
|
||||
let dlcode = ref false (* -dlcode *)
|
||||
let dlcode = ref true (* not -nodynlink *)
|
||||
|
||||
|
|
Loading…
Reference in New Issue