This commit is contained in:
Jérémie Dimino 2018-02-13 12:49:50 +00:00 committed by GitHub
parent 1e6ee05ecc
commit 2fb65c05ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 15 deletions

View File

@ -28,6 +28,8 @@ next
- Better support for mli/rei only modules (#490)
- Fix support for byte-code only architectures (#510, fixes #330)
1.0+beta17 (01/02/2018)
-----------------------

View File

@ -999,6 +999,7 @@ module Gen(P : Params) = struct
in
let { Mode.Dict. byte; native } = lib.modes in
let if_ cond l = if cond then l else [] in
let native = native && Option.is_some ctx.ocamlopt in
let files =
let modules = module_names_of_lib lib ~dir in
List.concat
@ -1015,19 +1016,15 @@ module Gen(P : Params) = struct
; if_ byte [ lib_archive ~dir lib ~ext:".cma" ]
; if_ (Library.has_stubs lib) [ stubs_archive ~dir lib ]
; if_ native
(match ctx.ocamlopt with
| None -> []
| Some _ ->
let files =
[ lib_archive ~dir lib ~ext:".cmxa"
; lib_archive ~dir lib ~ext:ctx.ext_lib
]
in
if ctx.natdynlink_supported && lib.dynlink then
files @ [ lib_archive ~dir lib ~ext:".cmxs" ]
else
files
)
(let files =
[ lib_archive ~dir lib ~ext:".cmxa"
; lib_archive ~dir lib ~ext:ctx.ext_lib
]
in
if ctx.natdynlink_supported && lib.dynlink then
files @ [ lib_archive ~dir lib ~ext:".cmxs" ]
else
files)
; List.map lib.buildable.js_of_ocaml.javascript_files ~f:(Path.relative dir)
; List.map lib.install_c_headers ~f:(fun fn ->
Path.relative dir (fn ^ ".h"))

View File

@ -1,9 +1,7 @@
$ env ORIG_PATH="$PATH" PATH="$PWD/ocaml-bin:$PATH" $JBUILDER build --root . -j1 --display short
No rule found for src/.foo.objs/foo.cmx
ocamldep bin/toto.ml.d
ocamldep src/foo.ml.d
ocamlc bin/.toto.eobjs/toto.{cmi,cmo,cmt}
ocamlc src/.foo.objs/foo.{cmi,cmo,cmt}
ocamlc bin/toto.exe
ocamlc src/foo.cma
[1]