diff options
author | Sébastien Hinderer <Sebastien.Hinderer@inria.fr> | 2016-11-25 15:57:14 +0100 |
---|---|---|
committer | Damien Doligez <damien.doligez@gmail.com> | 2016-11-25 15:57:14 +0100 |
commit | 8adfe15f182b9bfced844746bb0e8596dbf41d12 (patch) | |
tree | 183873a2bdc276149a310e343c9aa1e3d1ddbce6 /stdlib | |
parent | 2bd22967b407470ce687038709571645e955d8b3 (diff) | |
download | ocaml-8adfe15f182b9bfced844746bb0e8596dbf41d12.tar.gz |
Improve handling of platforms that do not have gprof profiling support (#933)
This commit modifies these two behaviours:
1. ``make install'' installs libraries with profiling support only when
this makes sense.
2. On platforms that do not support profiling with gprof, the -p option of
ocamlopt produces an error message.
On such platforms, ``make install'' was installing dummy profiling
libraries and ocamlopt's -p option was silently ignored.
In addition, this commit modifies the values of the PROFILING make
variable. Before the commit it was either prof or noprof. After the
commit it is either true or false.
In the asmrun directory, the call to ranlib for libasmrunp.a has also been
removed from the install target because this command is already invoked
in the rule that builds libasmrunp.a.
ocamlc/ocamlopt -config now prints the state of profiling support
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/Makefile | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/stdlib/Makefile b/stdlib/Makefile index 1660e27034..3ad984be9c 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -61,8 +61,14 @@ ifeq "$(RUNTIMEI)" "true" all: camlheaderi endif +ifeq "$(PROFILING)" "true" +PROFILINGTARGET = prof +else +PROFILINGTARGET = noprof +endif + .PHONY: allopt -allopt: stdlib.cmxa std_exit.cmx allopt-$(PROFILING) +allopt: stdlib.cmxa std_exit.cmx allopt-$(PROFILINGTARGET) .PHONY: allopt-noprof allopt-noprof: @@ -91,7 +97,7 @@ install:: endif .PHONY: installopt -installopt: installopt-default installopt-$(PROFILING) +installopt: installopt-default installopt-$(PROFILINGTARGET) .PHONY: installopt-default installopt-default: @@ -100,10 +106,6 @@ installopt-default: .PHONY: installopt-noprof installopt-noprof: - ln -sf stdlib.cmxa "$(INSTALL_LIBDIR)/stdlib.p.cmxa" - ln -sf stdlib.$(A) "$(INSTALL_LIBDIR)/stdlib.p.$(A)" - ln -sf std_exit.cmx "$(INSTALL_LIBDIR)/std_exit.p.cmx" - ln -sf std_exit.$(O) "$(INSTALL_LIBDIR)/std_exit.p.$(O)" .PHONY: installopt-prof installopt-prof: |