summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Scherer <gabriel.scherer@gmail.com>2017-10-04 17:40:27 +0200
committerGitHub <noreply@github.com>2017-10-04 17:40:27 +0200
commit74ccacd80e05d737455e1f5e3222ea5ca0a0ccc3 (patch)
tree22bda430f0e092fb1f744684c228df63c02d3486
parent0e19f896ab6c074865d87ffd5464c81b6216eff1 (diff)
parent6c443077d425e21ddc4f1761b1bd61ab83ba7749 (diff)
downloadocaml-74ccacd80e05d737455e1f5e3222ea5ca0a0ccc3.tar.gz
Merge pull request #1393 from yallop/config-fix
Restore support for native_c_compiler and bytecomp_c_compiler
-rw-r--r--utils/config.mlp12
1 files changed, 12 insertions, 0 deletions
diff --git a/utils/config.mlp b/utils/config.mlp
index 0a36c71dcf..76eabde067 100644
--- a/utils/config.mlp
+++ b/utils/config.mlp
@@ -37,6 +37,16 @@ let ocamlc_cppflags = "%%OCAMLC_CPPFLAGS%%"
let ocamlopt_cflags = "%%OCAMLOPT_CFLAGS%%"
let ocamlopt_cppflags = "%%OCAMLOPT_CPPFLAGS%%"
let bytecomp_c_libraries = "%%BYTECCLIBS%%"
+(* bytecomp_c_compiler and native_c_compiler have been supported for a
+ long time and are retained for backwards compatibility.
+ For programs that don't need compatibility with older OCaml releases
+ the recommended approach is to use the constituent variables
+ c_compiler, ocamlc_cflags, ocamlc_cppflags etc., directly.
+*)
+let bytecomp_c_compiler =
+ c_compiler ^ " " ^ ocamlc_cflags ^ " " ^ ocamlc_cppflags
+let native_c_compiler =
+ c_compiler ^ " " ^ ocamlopt_cflags ^ " " ^ ocamlopt_cppflags
let native_c_libraries = "%%NATIVECCLIBS%%"
let native_pack_linker = "%%PACKLD%%"
let ranlib = "%%RANLIBCMD%%"
@@ -146,10 +156,12 @@ let print_config oc =
p "standard_library" standard_library;
p "standard_runtime" standard_runtime;
p "ccomp_type" ccomp_type;
+ p "bytecomp_c_compiler" bytecomp_c_compiler;
p "c_compiler" c_compiler;
p "ocamlc_cflags" ocamlc_cflags;
p "ocamlopt_cflags" ocamlopt_cflags;
p "bytecomp_c_libraries" bytecomp_c_libraries;
+ p "native_c_compiler" native_c_compiler;
p "native_c_libraries" native_c_libraries;
p "native_pack_linker" native_pack_linker;
p "ranlib" ranlib;