# HG changeset patch # User Malcolm Matalka # Date 1654974798 14400 # Sat Jun 11 15:13:18 2022 -0400 # Node ID 1485bdd31e06198a6dd06e72f37c61d5a53db483 # Parent 82e6c1db7917f4449c498ee6a5f47459cc5593e4 REFACTOR Allow parallel builds by serializing native/byte in correct cases diff --git a/files/build_Makefile.tmpl b/files/build_Makefile.tmpl --- a/files/build_Makefile.tmpl +++ b/files/build_Makefile.tmpl @@ -1,7 +1,3 @@ -@?not_parallel-@ -.NOTPARALLEL: -@/not_parallel-@ - .PHONY: release debug profile docs install remove OCAMLDEP_OPTS=@extra_ocamldep_opts@ @@ -21,6 +17,10 @@ all: native-code byte-code +@?native_byte_in_serial-@ +$(BYTE_TARGET): $(NATIVE_TARGET) +@/native_byte_in_serial-@ + @?library-@ @-?install-@ all: META diff --git a/src/pds/pds.ml b/src/pds/pds.ml --- a/src/pds/pds.ml +++ b/src/pds/pds.ml @@ -432,10 +432,11 @@ (Lookup.strings lookup build "extra_makefile_lines")) in let kv = Snabela.Kv.(Map.of_list - [ ("not_parallel", bool (non_lib_modules <> [])) - (* If there are any non_lib_modules then make the build serial. This - is because generating .cmi's will conflict if they are generated in - parallel. *) + [ ("native_byte_in_serial", bool (non_lib_modules <> [])) + (* If there are any non_lib_modules then make the build + native and byte in serial. This is because + generating .cmi's will conflict if they are + generated in parallel. *) ; ("src_dir", string src_dir) ; ("packages", list packages) ; ("packages_str", string packages_str)