The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use the new framework to build compilerlibs

+365 -375
+48
Makefile
··· 164 164 $(foreach PROGRAM, $(OCAML_NATIVE_PROGRAMS),\ 165 165 $(eval $(call OCAML_NATIVE_PROGRAM,$(PROGRAM)))) 166 166 167 + # OCaml libraries that are compiled in both bytecode and native code 168 + 169 + # List of compilerlibs 170 + 171 + COMPILERLIBS = $(addprefix compilerlibs/, \ 172 + ocamlbytecomp \ 173 + ocamlcommon \ 174 + ocamlmiddleend \ 175 + ocamloptcomp \ 176 + ocamltoplevel) 177 + 178 + # Since the compiler libraries are necessarily compiled with boot/ocamlc, 179 + # make sure they *always are*, even when rebuilding a program compiled 180 + # with ./ocamlc (e.g. ocamltex) 181 + 182 + $(COMPILERLIBS:=.cma): \ 183 + CAMLC = $(BOOT_OCAMLC) $(BOOT_STDLIBFLAGS) -use-prims runtime/primitives 184 + 185 + # FIXME: how about making another target depend on $(ALL_CONFIG_CMO)? 186 + compilerlibs/ocamlcommon.cma: $(ALL_CONFIG_CMO) 187 + 188 + OCAML_LIBRARIES = $(COMPILERLIBS) 189 + 190 + $(foreach LIBRARY, $(OCAML_LIBRARIES),\ 191 + $(eval $(call OCAML_LIBRARY,$(LIBRARY)))) 192 + 193 + # OCaml libraries that are compiled only in bytecode 194 + 195 + OCAML_BYTECODE_LIBRARIES = 196 + 197 + $(foreach LIBRARY, $(OCAML_BYTECODE_LIBRARIES),\ 198 + $(eval $(call OCAML_BYTECODE_LIBRARY,$(LIBRARY)))) 199 + 200 + # OCaml libraries that are compiled only in native code 201 + 202 + OCAML_NATIVE_LIBRARIES = 203 + 204 + $(foreach LIBRARY, $(OCAML_NATIVE_LIBRARIES),\ 205 + $(eval $(call OCAML_NATIVE_LIBRARY,$(LIBRARY)))) 206 + 167 207 USE_RUNTIME_PRIMS = -use-prims ../runtime/primitives 168 208 USE_STDLIB = -nostdlib -I ../stdlib 169 209 ··· 2150 2190 @echo " make install" 2151 2191 @echo "should work." 2152 2192 @false 2193 + 2194 + # We need to express that all the CMX files depend on the native compiler, 2195 + # so that they get invalidated and rebuilt when the compiler is updated 2196 + # This dependency must appear after all the definitions of the 2197 + # _SOURCES variable so that GNU make's secondary expansion mechanism works 2198 + # This is why this dependency is kept at the very end of this file 2199 + 2200 + $(ALL_CMX_FILES): ocamlopt$(EXE)
+317 -375
compilerlibs/Makefile.compilerlibs
··· 18 18 # This file is meant to be included from the root Makefile, not to be 19 19 # executed directly (this is why it is not simply named Makefile). 20 20 21 - # For each group of compilation units, we have a variable GROUP with 22 - # only .cmo files, and a separate variable GROUP_CMI for .cmi files 23 - # corresponding to the .mli-only modules only. These .cmi are not 24 - # linked in the archive, but they are marked as dependencies to ensure 25 - # that they are consistent with the interface digests in the archives. 21 + utils_SOURCES = $(addprefix utils/, \ 22 + config.mli config.ml \ 23 + build_path_prefix_map.mli build_path_prefix_map.ml \ 24 + misc.mli misc.ml \ 25 + identifiable.mli identifiable.ml \ 26 + numbers.mli numbers.ml \ 27 + arg_helper.mli arg_helper.ml \ 28 + local_store.mli local_store.ml \ 29 + load_path.mli load_path.ml \ 30 + clflags.mli clflags.ml \ 31 + profile.mli profile.ml \ 32 + terminfo.mli terminfo.ml \ 33 + ccomp.mli ccomp.ml \ 34 + warnings.mli warnings.ml \ 35 + consistbl.mli consistbl.ml \ 36 + strongly_connected_components.mli strongly_connected_components.ml \ 37 + targetint.mli targetint.ml \ 38 + int_replace_polymorphic_compare.mli int_replace_polymorphic_compare.ml \ 39 + domainstate.mli domainstate.ml \ 40 + binutils.mli binutils.ml \ 41 + lazy_backtrack.mli lazy_backtrack.ml \ 42 + diffing.mli diffing.ml \ 43 + diffing_with_keys.mli diffing_with_keys.ml) 26 44 27 - UTILS = \ 28 - utils/config.cmo \ 29 - utils/build_path_prefix_map.cmo \ 30 - utils/misc.cmo \ 31 - utils/identifiable.cmo \ 32 - utils/numbers.cmo \ 33 - utils/arg_helper.cmo \ 34 - utils/local_store.cmo \ 35 - utils/load_path.cmo \ 36 - utils/clflags.cmo \ 37 - utils/profile.cmo \ 38 - utils/terminfo.cmo \ 39 - utils/ccomp.cmo \ 40 - utils/warnings.cmo \ 41 - utils/consistbl.cmo \ 42 - utils/strongly_connected_components.cmo \ 43 - utils/targetint.cmo \ 44 - utils/int_replace_polymorphic_compare.cmo \ 45 - utils/domainstate.cmo \ 46 - utils/binutils.cmo \ 47 - utils/lazy_backtrack.cmo \ 48 - utils/diffing.cmo \ 49 - utils/diffing_with_keys.cmo 50 - UTILS_CMI = 45 + parsing_SOURCES = $(addprefix parsing/, \ 46 + location.mli location.ml \ 47 + unit_info.mli unit_info.ml \ 48 + asttypes.mli \ 49 + longident.mli longident.ml \ 50 + parsetree.mli \ 51 + docstrings.mli docstrings.ml \ 52 + syntaxerr.mli syntaxerr.ml \ 53 + ast_helper.mli ast_helper.ml \ 54 + camlinternalMenhirLib.mli camlinternalMenhirLib.ml \ 55 + parser.mly \ 56 + lexer.mll \ 57 + pprintast.mli pprintast.ml \ 58 + parse.mli parse.ml \ 59 + printast.mli printast.ml \ 60 + ast_mapper.mli ast_mapper.ml \ 61 + ast_iterator.mli ast_iterator.ml \ 62 + attr_helper.mli attr_helper.ml \ 63 + builtin_attributes.mli builtin_attributes.ml \ 64 + ast_invariants.mli ast_invariants.ml \ 65 + depend.mli depend.ml) 51 66 52 - PARSING = \ 53 - parsing/location.cmo \ 54 - parsing/unit_info.cmo \ 55 - parsing/longident.cmo \ 56 - parsing/docstrings.cmo \ 57 - parsing/syntaxerr.cmo \ 58 - parsing/ast_helper.cmo \ 59 - parsing/camlinternalMenhirLib.cmo \ 60 - parsing/parser.cmo \ 61 - parsing/lexer.cmo \ 62 - parsing/pprintast.cmo \ 63 - parsing/parse.cmo \ 64 - parsing/printast.cmo \ 65 - parsing/ast_mapper.cmo \ 66 - parsing/ast_iterator.cmo \ 67 - parsing/attr_helper.cmo \ 68 - parsing/builtin_attributes.cmo \ 69 - parsing/ast_invariants.cmo \ 70 - parsing/depend.cmo 71 - PARSING_CMI = \ 72 - parsing/asttypes.cmi \ 73 - parsing/parsetree.cmi 74 - 75 - TYPING = \ 76 - typing/ident.cmo \ 77 - typing/path.cmo \ 78 - typing/primitive.cmo \ 79 - typing/type_immediacy.cmo \ 80 - typing/shape.cmo \ 81 - typing/types.cmo \ 82 - typing/btype.cmo \ 83 - typing/oprint.cmo \ 84 - typing/subst.cmo \ 85 - typing/predef.cmo \ 86 - typing/datarepr.cmo \ 87 - file_formats/cmi_format.cmo \ 88 - typing/persistent_env.cmo \ 89 - typing/env.cmo \ 90 - typing/errortrace.cmo \ 91 - typing/typedtree.cmo \ 92 - typing/signature_group.cmo \ 93 - typing/printtyped.cmo \ 94 - typing/ctype.cmo \ 95 - typing/printtyp.cmo \ 96 - typing/includeclass.cmo \ 97 - typing/mtype.cmo \ 98 - typing/envaux.cmo \ 99 - typing/includecore.cmo \ 100 - typing/tast_iterator.cmo \ 101 - typing/tast_mapper.cmo \ 102 - typing/stypes.cmo \ 103 - file_formats/cmt_format.cmo \ 104 - typing/cmt2annot.cmo \ 105 - typing/untypeast.cmo \ 106 - typing/includemod.cmo \ 107 - typing/includemod_errorprinter.cmo \ 108 - typing/typetexp.cmo \ 109 - typing/printpat.cmo \ 110 - typing/patterns.cmo \ 111 - typing/parmatch.cmo \ 112 - typing/typedecl_properties.cmo \ 113 - typing/typedecl_variance.cmo \ 114 - typing/typedecl_unboxed.cmo \ 115 - typing/typedecl_immediacy.cmo \ 116 - typing/typedecl_separability.cmo \ 117 - typing/typeopt.cmo \ 118 - typing/typedecl.cmo \ 119 - typing/rec_check.cmo \ 120 - typing/typecore.cmo \ 121 - typing/typeclass.cmo \ 122 - typing/typemod.cmo 123 - TYPING_CMI = \ 124 - typing/annot.cmi \ 125 - typing/outcometree.cmi 67 + typing_SOURCES = \ 68 + $(addprefix typing/,\ 69 + annot.mli \ 70 + ident.mli ident.ml \ 71 + path.mli path.ml \ 72 + primitive.mli primitive.ml \ 73 + type_immediacy.mli type_immediacy.ml \ 74 + outcometree.mli \ 75 + shape.mli shape.ml \ 76 + types.mli types.ml \ 77 + btype.mli btype.ml \ 78 + oprint.mli oprint.ml \ 79 + subst.mli subst.ml \ 80 + predef.mli predef.ml \ 81 + datarepr.mli datarepr.ml) \ 82 + file_formats/cmi_format.mli file_formats/cmi_format.ml \ 83 + $(addprefix typing/, \ 84 + persistent_env.mli persistent_env.ml \ 85 + env.mli env.ml \ 86 + errortrace.mli errortrace.ml \ 87 + typedtree.mli typedtree.ml \ 88 + signature_group.mli signature_group.ml \ 89 + printtyped.mli printtyped.ml \ 90 + ctype.mli ctype.ml \ 91 + printtyp.mli printtyp.ml \ 92 + includeclass.mli includeclass.ml \ 93 + mtype.mli mtype.ml \ 94 + envaux.mli envaux.ml \ 95 + includecore.mli includecore.ml \ 96 + tast_iterator.mli tast_iterator.ml \ 97 + tast_mapper.mli tast_mapper.ml \ 98 + stypes.mli stypes.ml) \ 99 + file_formats/cmt_format.mli file_formats/cmt_format.ml \ 100 + $(addprefix typing/, \ 101 + cmt2annot.mli cmt2annot.ml \ 102 + untypeast.mli untypeast.ml \ 103 + includemod.mli includemod.ml \ 104 + includemod_errorprinter.mli includemod_errorprinter.ml \ 105 + typetexp.mli typetexp.ml \ 106 + printpat.mli printpat.ml \ 107 + patterns.mli patterns.ml \ 108 + parmatch.mli parmatch.ml \ 109 + typedecl_properties.mli typedecl_properties.ml \ 110 + typedecl_variance.mli typedecl_variance.ml \ 111 + typedecl_unboxed.mli typedecl_unboxed.ml \ 112 + typedecl_immediacy.mli typedecl_immediacy.ml \ 113 + typedecl_separability.mli typedecl_separability.ml \ 114 + typeopt.mli typeopt.ml \ 115 + typedecl.mli typedecl.ml \ 116 + rec_check.mli rec_check.ml \ 117 + typecore.mli typecore.ml \ 118 + typeclass.mli typeclass.ml \ 119 + typemod.mli typemod.ml) 126 120 127 - LAMBDA = \ 128 - lambda/debuginfo.cmo \ 129 - lambda/lambda.cmo \ 130 - lambda/printlambda.cmo \ 131 - lambda/switch.cmo \ 132 - lambda/matching.cmo \ 133 - lambda/translobj.cmo \ 134 - lambda/translattribute.cmo \ 135 - lambda/translprim.cmo \ 136 - lambda/translcore.cmo \ 137 - lambda/translclass.cmo \ 138 - lambda/translmod.cmo \ 139 - lambda/tmc.cmo \ 140 - lambda/simplif.cmo \ 141 - lambda/runtimedef.cmo 142 - LAMBDA_CMI = 121 + lambda_SOURCES = $(addprefix lambda/, \ 122 + debuginfo.mli debuginfo.ml \ 123 + lambda.mli lambda.ml \ 124 + printlambda.mli printlambda.ml \ 125 + switch.mli switch.ml \ 126 + matching.mli matching.ml \ 127 + translobj.mli translobj.ml \ 128 + translattribute.mli translattribute.ml \ 129 + translprim.mli translprim.ml \ 130 + translcore.mli translcore.ml \ 131 + translclass.mli translclass.ml \ 132 + translmod.mli translmod.ml \ 133 + tmc.mli tmc.ml \ 134 + simplif.mli simplif.ml \ 135 + runtimedef.mli runtimedef.ml) 143 136 144 - COMP = \ 145 - bytecomp/meta.cmo \ 146 - bytecomp/opcodes.cmo \ 147 - bytecomp/bytesections.cmo \ 148 - bytecomp/dll.cmo \ 149 - bytecomp/symtable.cmo \ 150 - driver/pparse.cmo \ 151 - driver/compenv.cmo \ 152 - driver/main_args.cmo \ 153 - driver/compmisc.cmo \ 154 - driver/makedepend.cmo \ 155 - driver/compile_common.cmo 156 - COMP_CMI = \ 157 - file_formats/cmo_format.cmi \ 158 - file_formats/cmx_format.cmi \ 159 - file_formats/cmxs_format.cmi 137 + comp_SOURCES = \ 138 + $(addprefix file_formats/, \ 139 + cmo_format.mli \ 140 + cmx_format.mli \ 141 + cmxs_format.mli) \ 142 + $(addprefix bytecomp/, \ 143 + meta.mli meta.ml \ 144 + opcodes.mli opcodes.ml \ 145 + bytesections.mli bytesections.ml \ 146 + dll.mli dll.ml \ 147 + symtable.mli symtable.ml) \ 148 + $(addprefix driver/, \ 149 + pparse.mli pparse.ml \ 150 + compenv.mli compenv.ml \ 151 + main_args.mli main_args.ml \ 152 + compmisc.mli compmisc.ml \ 153 + makedepend.mli makedepend.ml \ 154 + compile_common.mli compile_common.ml) 160 155 # All file format descriptions (including cmx{,s}) are in the 161 156 # ocamlcommon library so that ocamlobjinfo can depend on them. 162 157 163 - COMMON_CMI = $(UTILS_CMI) $(PARSING_CMI) $(TYPING_CMI) $(LAMBDA_CMI) $(COMP_CMI) 158 + ocamlcommon_SOURCES = \ 159 + $(utils_SOURCES) $(parsing_SOURCES) $(typing_SOURCES) \ 160 + $(lambda_SOURCES) $(comp_SOURCES) 164 161 165 - COMMON = $(UTILS) $(PARSING) $(TYPING) $(LAMBDA) $(COMP) 162 + ocamlbytecomp_SOURCES = \ 163 + $(addprefix bytecomp/, \ 164 + instruct.mli instruct.ml \ 165 + bytegen.mli bytegen.ml \ 166 + printinstr.mli printinstr.ml \ 167 + emitcode.mli emitcode.ml \ 168 + bytelink.mli bytelink.ml \ 169 + bytelibrarian.mli bytelibrarian.ml \ 170 + bytepackager.mli bytepackager.ml) \ 171 + $(addprefix driver/, \ 172 + errors.mli errors.ml \ 173 + compile.mli compile.ml \ 174 + maindriver.mli maindriver.ml) 166 175 167 - BYTECOMP = \ 168 - bytecomp/instruct.cmo \ 169 - bytecomp/bytegen.cmo \ 170 - bytecomp/printinstr.cmo \ 171 - bytecomp/emitcode.cmo \ 172 - bytecomp/bytelink.cmo \ 173 - bytecomp/bytelibrarian.cmo \ 174 - bytecomp/bytepackager.cmo \ 175 - driver/errors.cmo \ 176 - driver/compile.cmo \ 177 - driver/maindriver.cmo 178 - BYTECOMP_CMI = 179 - 180 - INTEL_ASM = \ 181 - asmcomp/x86_proc.cmo \ 182 - asmcomp/x86_dsl.cmo \ 183 - asmcomp/x86_gas.cmo \ 184 - asmcomp/x86_masm.cmo 185 - INTEL_ASM_CMI = \ 186 - asmcomp/x86_ast.cmi 176 + intel_SOURCES = \ 177 + x86_ast.mli \ 178 + x86_proc.mli x86_proc.ml \ 179 + x86_dsl.mli x86_dsl.ml \ 180 + x86_gas.mli x86_gas.ml \ 181 + x86_masm.mli x86_masm.ml 187 182 188 - ARCH_SPECIFIC_ASMCOMP = 189 - ARCH_SPECIFIC_ASMCOMP_CMI = 183 + arch_specific_SOURCES = 190 184 ifeq ($(ARCH),i386) 191 - ARCH_SPECIFIC_ASMCOMP = $(INTEL_ASM) 192 - ARCH_SPECIFIC_ASMCOMP_CMI = $(INTEL_ASM_CMI) 185 + arch_specific_SOURCES = $(intel_SOURCES) 193 186 endif 194 187 ifeq ($(ARCH),amd64) 195 - ARCH_SPECIFIC_ASMCOMP = $(INTEL_ASM) 196 - ARCH_SPECIFIC_ASMCOMP_CMI = $(INTEL_ASM_CMI) 188 + arch_specific_SOURCES = $(intel_SOURCES) 197 189 endif 198 190 199 - ASMCOMP = \ 200 - $(ARCH_SPECIFIC_ASMCOMP) \ 201 - asmcomp/arch.cmo \ 202 - asmcomp/cmm.cmo \ 203 - asmcomp/printcmm.cmo \ 204 - asmcomp/reg.cmo \ 205 - asmcomp/mach.cmo \ 206 - asmcomp/proc.cmo \ 207 - asmcomp/strmatch.cmo \ 208 - asmcomp/cmmgen_state.cmo \ 209 - asmcomp/cmm_helpers.cmo \ 210 - asmcomp/afl_instrument.cmo \ 211 - asmcomp/thread_sanitizer.cmo \ 212 - asmcomp/cmmgen.cmo \ 213 - asmcomp/cmm_invariants.cmo \ 214 - asmcomp/interval.cmo \ 215 - asmcomp/printmach.cmo \ 216 - asmcomp/dataflow.cmo \ 217 - asmcomp/polling.cmo \ 218 - asmcomp/selectgen.cmo \ 219 - asmcomp/selection.cmo \ 220 - asmcomp/comballoc.cmo \ 221 - asmcomp/CSEgen.cmo \ 222 - asmcomp/CSE.cmo \ 223 - asmcomp/liveness.cmo \ 224 - asmcomp/spill.cmo \ 225 - asmcomp/split.cmo \ 226 - asmcomp/interf.cmo \ 227 - asmcomp/coloring.cmo \ 228 - asmcomp/linscan.cmo \ 229 - asmcomp/reloadgen.cmo \ 230 - asmcomp/reload.cmo \ 231 - asmcomp/deadcode.cmo \ 232 - asmcomp/stackframegen.cmo \ 233 - asmcomp/stackframe.cmo \ 234 - asmcomp/linear.cmo \ 235 - asmcomp/printlinear.cmo \ 236 - asmcomp/linearize.cmo \ 237 - file_formats/linear_format.cmo \ 238 - asmcomp/schedgen.cmo \ 239 - asmcomp/scheduling.cmo \ 240 - asmcomp/branch_relaxation.cmo \ 241 - asmcomp/emitaux.cmo \ 242 - asmcomp/emit.cmo \ 243 - asmcomp/asmgen.cmo \ 244 - asmcomp/asmlink.cmo \ 245 - asmcomp/asmlibrarian.cmo \ 246 - asmcomp/asmpackager.cmo \ 247 - driver/opterrors.cmo \ 248 - driver/optcompile.cmo \ 249 - driver/optmaindriver.cmo 250 - ASMCOMP_CMI = $(ARCH_SPECIFIC_ASMCOMP_CMI) 191 + asmcomp_SOURCES = \ 192 + $(addprefix asmcomp/, \ 193 + $(arch_specific_SOURCES) \ 194 + arch.mli arch.ml \ 195 + cmm.mli cmm.ml \ 196 + printcmm.mli printcmm.ml \ 197 + reg.mli reg.ml \ 198 + mach.mli mach.ml \ 199 + proc.mli proc.ml \ 200 + strmatch.mli strmatch.ml \ 201 + cmmgen_state.mli cmmgen_state.ml \ 202 + cmm_helpers.mli cmm_helpers.ml \ 203 + afl_instrument.mli afl_instrument.ml \ 204 + thread_sanitizer.mli thread_sanitizer.ml \ 205 + cmmgen.mli cmmgen.ml \ 206 + cmm_invariants.mli cmm_invariants.ml \ 207 + interval.mli interval.ml \ 208 + printmach.mli printmach.ml \ 209 + dataflow.mli dataflow.ml \ 210 + polling.mli polling.ml \ 211 + selectgen.mli selectgen.ml \ 212 + selection.mli selection.ml \ 213 + comballoc.mli comballoc.ml \ 214 + CSEgen.mli CSEgen.ml \ 215 + CSE.mli CSE.ml \ 216 + liveness.mli liveness.ml \ 217 + spill.mli spill.ml \ 218 + split.mli split.ml \ 219 + interf.mli interf.ml \ 220 + coloring.mli coloring.ml \ 221 + linscan.mli linscan.ml \ 222 + reloadgen.mli reloadgen.ml \ 223 + reload.mli reload.ml \ 224 + deadcode.mli deadcode.ml \ 225 + stackframegen.mli stackframegen.ml \ 226 + stackframe.mli stackframe.ml \ 227 + linear.mli linear.ml \ 228 + printlinear.mli printlinear.ml \ 229 + linearize.mli linearize.ml) \ 230 + file_formats/linear_format.mli file_formats/linear_format.ml \ 231 + $(addprefix asmcomp/, \ 232 + schedgen.mli schedgen.ml \ 233 + scheduling.mli scheduling.ml \ 234 + branch_relaxation.mli branch_relaxation.ml \ 235 + emitaux.mli emitaux.ml \ 236 + emit.mli emit.ml \ 237 + asmgen.mli asmgen.ml \ 238 + asmlink.mli asmlink.ml \ 239 + asmlibrarian.mli asmlibrarian.ml \ 240 + asmpackager.mli asmpackager.ml) \ 241 + $(addprefix driver/, \ 242 + opterrors.mli opterrors.ml \ 243 + optcompile.mli optcompile.ml \ 244 + optmaindriver.mli optmaindriver.ml) 251 245 252 246 # Files under middle_end/ are not to reference files under asmcomp/. 253 247 # This ensures that the middle end can be linked (e.g. for objinfo) even when 254 248 # the native code compiler is not present for some particular target. 255 249 256 - MIDDLE_END_CLOSURE = \ 257 - middle_end/closure/closure.cmo \ 258 - middle_end/closure/closure_middle_end.cmo 259 - MIDDLE_END_CLOSURE_CMI = 250 + middle_end_closure_SOURCES = $(addprefix middle_end/closure/, \ 251 + closure.mli closure.ml \ 252 + closure_middle_end.mli closure_middle_end.ml) 260 253 261 254 # Owing to dependencies through [Compilenv], which would be 262 255 # difficult to remove, some of the lower parts of Flambda (anything that is 263 256 # saved in a .cmx file) have to be included in the [MIDDLE_END] stanza, below. 264 - MIDDLE_END_FLAMBDA = \ 265 - middle_end/flambda/import_approx.cmo \ 266 - middle_end/flambda/lift_code.cmo \ 267 - middle_end/flambda/closure_conversion_aux.cmo \ 268 - middle_end/flambda/closure_conversion.cmo \ 269 - middle_end/flambda/initialize_symbol_to_let_symbol.cmo \ 270 - middle_end/flambda/lift_let_to_initialize_symbol.cmo \ 271 - middle_end/flambda/find_recursive_functions.cmo \ 272 - middle_end/flambda/invariant_params.cmo \ 273 - middle_end/flambda/inconstant_idents.cmo \ 274 - middle_end/flambda/alias_analysis.cmo \ 275 - middle_end/flambda/lift_constants.cmo \ 276 - middle_end/flambda/share_constants.cmo \ 277 - middle_end/flambda/simplify_common.cmo \ 278 - middle_end/flambda/remove_unused_arguments.cmo \ 279 - middle_end/flambda/remove_unused_closure_vars.cmo \ 280 - middle_end/flambda/remove_unused_program_constructs.cmo \ 281 - middle_end/flambda/simplify_boxed_integer_ops.cmo \ 282 - middle_end/flambda/simplify_primitives.cmo \ 283 - middle_end/flambda/inlining_stats_types.cmo \ 284 - middle_end/flambda/inlining_stats.cmo \ 285 - middle_end/flambda/inline_and_simplify_aux.cmo \ 286 - middle_end/flambda/remove_free_vars_equal_to_args.cmo \ 287 - middle_end/flambda/extract_projections.cmo \ 288 - middle_end/flambda/augment_specialised_args.cmo \ 289 - middle_end/flambda/unbox_free_vars_of_closures.cmo \ 290 - middle_end/flambda/unbox_specialised_args.cmo \ 291 - middle_end/flambda/unbox_closures.cmo \ 292 - middle_end/flambda/inlining_transforms.cmo \ 293 - middle_end/flambda/inlining_decision.cmo \ 294 - middle_end/flambda/inline_and_simplify.cmo \ 295 - middle_end/flambda/ref_to_variables.cmo \ 296 - middle_end/flambda/flambda_invariants.cmo \ 297 - middle_end/flambda/traverse_for_exported_symbols.cmo \ 298 - middle_end/flambda/build_export_info.cmo \ 299 - middle_end/flambda/closure_offsets.cmo \ 300 - middle_end/flambda/un_anf.cmo \ 301 - middle_end/flambda/flambda_to_clambda.cmo \ 302 - middle_end/flambda/flambda_middle_end.cmo 303 - MIDDLE_END_FLAMBDA_CMI = \ 304 - middle_end/flambda/inlining_decision_intf.cmi \ 305 - middle_end/flambda/simplify_boxed_integer_ops_intf.cmi 306 - 307 - MIDDLE_END = \ 308 - middle_end/internal_variable_names.cmo \ 309 - middle_end/linkage_name.cmo \ 310 - middle_end/compilation_unit.cmo \ 311 - middle_end/variable.cmo \ 312 - middle_end/flambda/base_types/closure_element.cmo \ 313 - middle_end/flambda/base_types/closure_id.cmo \ 314 - middle_end/symbol.cmo \ 315 - middle_end/backend_var.cmo \ 316 - middle_end/clambda_primitives.cmo \ 317 - middle_end/printclambda_primitives.cmo \ 318 - middle_end/clambda.cmo \ 319 - middle_end/printclambda.cmo \ 320 - middle_end/semantics_of_primitives.cmo \ 321 - middle_end/convert_primitives.cmo \ 322 - middle_end/flambda/base_types/id_types.cmo \ 323 - middle_end/flambda/base_types/export_id.cmo \ 324 - middle_end/flambda/base_types/tag.cmo \ 325 - middle_end/flambda/base_types/mutable_variable.cmo \ 326 - middle_end/flambda/base_types/set_of_closures_id.cmo \ 327 - middle_end/flambda/base_types/set_of_closures_origin.cmo \ 328 - middle_end/flambda/base_types/closure_origin.cmo \ 329 - middle_end/flambda/base_types/var_within_closure.cmo \ 330 - middle_end/flambda/base_types/static_exception.cmo \ 331 - middle_end/flambda/pass_wrapper.cmo \ 332 - middle_end/flambda/allocated_const.cmo \ 333 - middle_end/flambda/parameter.cmo \ 334 - middle_end/flambda/projection.cmo \ 335 - middle_end/flambda/flambda.cmo \ 336 - middle_end/flambda/flambda_iterators.cmo \ 337 - middle_end/flambda/flambda_utils.cmo \ 338 - middle_end/flambda/freshening.cmo \ 339 - middle_end/flambda/effect_analysis.cmo \ 340 - middle_end/flambda/inlining_cost.cmo \ 341 - middle_end/flambda/simple_value_approx.cmo \ 342 - middle_end/flambda/export_info.cmo \ 343 - middle_end/flambda/export_info_for_pack.cmo \ 344 - middle_end/compilenv.cmo \ 345 - $(MIDDLE_END_CLOSURE) \ 346 - $(MIDDLE_END_FLAMBDA) 347 - MIDDLE_END_CMI = \ 348 - middle_end/backend_intf.cmi \ 349 - $(MIDDLE_END_CLOSURE_CMI) \ 350 - $(MIDDLE_END_FLAMBDA_CMI) 257 + middle_end_flambda_SOURCES = \ 258 + $(addprefix middle_end/flambda/, \ 259 + import_approx.mli import_approx.ml \ 260 + lift_code.mli lift_code.ml \ 261 + closure_conversion_aux.mli closure_conversion_aux.ml \ 262 + closure_conversion.mli closure_conversion.ml \ 263 + initialize_symbol_to_let_symbol.mli initialize_symbol_to_let_symbol.ml \ 264 + lift_let_to_initialize_symbol.mli lift_let_to_initialize_symbol.ml \ 265 + find_recursive_functions.mli find_recursive_functions.ml \ 266 + invariant_params.mli invariant_params.ml \ 267 + inconstant_idents.mli inconstant_idents.ml \ 268 + alias_analysis.mli alias_analysis.ml \ 269 + lift_constants.mli lift_constants.ml \ 270 + share_constants.mli share_constants.ml \ 271 + simplify_common.mli simplify_common.ml \ 272 + remove_unused_arguments.mli remove_unused_arguments.ml \ 273 + remove_unused_closure_vars.mli remove_unused_closure_vars.ml \ 274 + remove_unused_program_constructs.mli remove_unused_program_constructs.ml \ 275 + simplify_boxed_integer_ops.mli simplify_boxed_integer_ops.ml \ 276 + simplify_primitives.mli simplify_primitives.ml \ 277 + inlining_stats_types.mli inlining_stats_types.ml \ 278 + inlining_stats.mli inlining_stats.ml \ 279 + inline_and_simplify_aux.mli inline_and_simplify_aux.ml \ 280 + inlining_decision_intf.mli \ 281 + remove_free_vars_equal_to_args.mli remove_free_vars_equal_to_args.ml \ 282 + extract_projections.mli extract_projections.ml \ 283 + augment_specialised_args.mli augment_specialised_args.ml \ 284 + unbox_free_vars_of_closures.mli unbox_free_vars_of_closures.ml \ 285 + unbox_specialised_args.mli unbox_specialised_args.ml \ 286 + unbox_closures.mli unbox_closures.ml \ 287 + inlining_transforms.mli inlining_transforms.ml \ 288 + inlining_decision.mli inlining_decision.ml \ 289 + inline_and_simplify.mli inline_and_simplify.ml \ 290 + ref_to_variables.mli ref_to_variables.ml \ 291 + flambda_invariants.mli flambda_invariants.ml \ 292 + traverse_for_exported_symbols.mli traverse_for_exported_symbols.ml \ 293 + build_export_info.mli build_export_info.ml \ 294 + closure_offsets.mli closure_offsets.ml \ 295 + un_anf.mli un_anf.ml \ 296 + flambda_to_clambda.mli flambda_to_clambda.ml \ 297 + flambda_middle_end.mli flambda_middle_end.ml \ 298 + simplify_boxed_integer_ops_intf.mli) 351 299 352 - OPTCOMP = $(MIDDLE_END) $(ASMCOMP) 353 - OPTCOMP_CMI = $(MIDDLE_END_CMI) $(ASMCOMP_CMI) 300 + ocamlmiddleend_SOURCES = \ 301 + $(addprefix middle_end/, \ 302 + internal_variable_names.mli internal_variable_names.ml \ 303 + linkage_name.mli linkage_name.ml \ 304 + compilation_unit.mli compilation_unit.ml \ 305 + variable.mli variable.ml \ 306 + $(addprefix flambda/base_types/, \ 307 + closure_element.mli closure_element.ml \ 308 + closure_id.mli closure_id.ml) \ 309 + symbol.mli symbol.ml \ 310 + backend_var.mli backend_var.ml \ 311 + clambda_primitives.mli clambda_primitives.ml \ 312 + printclambda_primitives.mli printclambda_primitives.ml \ 313 + clambda.mli clambda.ml \ 314 + printclambda.mli printclambda.ml \ 315 + semantics_of_primitives.mli semantics_of_primitives.ml \ 316 + convert_primitives.mli convert_primitives.ml \ 317 + $(addprefix flambda/, \ 318 + $(addprefix base_types/, \ 319 + id_types.mli id_types.ml \ 320 + export_id.mli export_id.ml \ 321 + tag.mli tag.ml \ 322 + mutable_variable.mli mutable_variable.ml \ 323 + set_of_closures_id.mli set_of_closures_id.ml \ 324 + set_of_closures_origin.mli set_of_closures_origin.ml \ 325 + closure_origin.mli closure_origin.ml \ 326 + var_within_closure.mli var_within_closure.ml \ 327 + static_exception.mli static_exception.ml) \ 328 + pass_wrapper.mli pass_wrapper.ml \ 329 + allocated_const.mli allocated_const.ml \ 330 + parameter.mli parameter.ml \ 331 + projection.mli projection.ml \ 332 + flambda.mli flambda.ml \ 333 + flambda_iterators.mli flambda_iterators.ml \ 334 + flambda_utils.mli flambda_utils.ml \ 335 + freshening.mli freshening.ml \ 336 + effect_analysis.mli effect_analysis.ml \ 337 + inlining_cost.mli inlining_cost.ml \ 338 + simple_value_approx.mli simple_value_approx.ml \ 339 + export_info.mli export_info.ml \ 340 + export_info_for_pack.mli export_info_for_pack.ml) \ 341 + compilenv.mli compilenv.ml \ 342 + backend_intf.mli) \ 343 + $(middle_end_closure_SOURCES) \ 344 + $(middle_end_flambda_SOURCES) 354 345 355 - TOPLEVEL = \ 356 - toplevel/genprintval.cmo \ 357 - toplevel/topcommon.cmo \ 358 - toplevel/byte/topeval.cmo \ 359 - toplevel/byte/trace.cmo \ 360 - toplevel/toploop.cmo \ 361 - toplevel/topprinters.cmo \ 362 - toplevel/topdirs.cmo \ 363 - toplevel/byte/topmain.cmo 364 - TOPLEVEL_CMI = \ 365 - toplevel/topcommon.cmi \ 366 - toplevel/byte/topeval.cmi \ 367 - toplevel/byte/trace.cmi \ 368 - toplevel/toploop.cmi \ 369 - toplevel/topprinters.cmi \ 370 - toplevel/topdirs.cmi \ 371 - toplevel/byte/topmain.cmi 346 + ocamloptcomp_SOURCES = $(ocamlmiddleend_SOURCES) $(asmcomp_SOURCES) 372 347 373 - OPTTOPLEVEL = \ 374 - toplevel/genprintval.cmo \ 375 - toplevel/topcommon.cmo \ 376 - toplevel/native/tophooks.cmo \ 377 - toplevel/native/topeval.cmo \ 378 - toplevel/native/trace.cmo \ 379 - toplevel/toploop.cmo \ 380 - toplevel/topprinters.cmo \ 381 - toplevel/topdirs.cmo \ 382 - toplevel/native/topmain.cmo 383 - OPTTOPLEVEL_CMI = \ 384 - toplevel/topcommon.cmi \ 385 - toplevel/native/tophooks.cmi \ 386 - toplevel/native/topeval.cmi \ 387 - toplevel/native/trace.cmi \ 388 - toplevel/toploop.cmi \ 389 - toplevel/topprinters.cmi \ 390 - toplevel/topdirs.cmi \ 391 - toplevel/native/topmain.cmi 348 + ocamltoplevel_SOURCES = $(addprefix toplevel/, \ 349 + genprintval.mli genprintval.ml \ 350 + topcommon.mli topcommon.ml \ 351 + native/tophooks.mli native/tophooks.ml \ 352 + byte/topeval.mli byte/topeval.ml \ 353 + native/topeval.mli native/topeval.ml \ 354 + byte/trace.mli byte/trace.ml \ 355 + native/trace.mli native/trace.ml \ 356 + toploop.mli toploop.ml \ 357 + topprinters.mli topprinters.ml \ 358 + topdirs.mli topdirs.ml \ 359 + byte/topmain.mli byte/topmain.ml \ 360 + native/topmain.mli native/topmain.ml) 392 361 393 362 TOPLEVEL_SHARED_MLIS = topeval.mli trace.mli topmain.mli 394 363 TOPLEVEL_SHARED_CMIS = $(TOPLEVEL_SHARED_MLIS:%.mli=%.cmi) ··· 410 379 cd toplevel/byte ; rm -f $(TOPLEVEL_SHARED_ARTEFACTS) 411 380 cd toplevel/native ; rm -f $(TOPLEVEL_SHARED_ARTEFACTS) 412 381 413 - $(COMMON:.cmo=.cmx) $(BYTECOMP:.cmo=.cmx) $(OPTCOMP:.cmo=.cmx): ocamlopt$(EXE) 414 - $(OPTTOPLEVEL:.cmo=.cmx): ocamlopt$(EXE) 415 - 416 382 ALL_CONFIG_CMO = utils/config_main.cmo utils/config_boot.cmo 417 383 418 384 utils/config_%.mli: utils/config.mli ··· 420 386 421 387 beforedepend:: utils/config_main.mli utils/config_boot.mli 422 388 423 - # Since the compiler libraries are necessarily compiled with boot/ocamlc, 424 - # make sure they *always are*, even when rebuilding a program compiled 425 - # with ./ocamlc (e.g. ocamltex) 426 - 427 - $(addprefix compilerlibs/,\ 428 - ocamlcommon.cma ocamlbytecomp.cma ocamloptcomp.cma ocamlmiddleend.cma \ 429 - ocamltoplevel.cma): \ 430 - CAMLC = $(BOOT_OCAMLC) $(BOOT_STDLIBFLAGS) -use-prims runtime/primitives 389 + $(addprefix compilerlibs/ocamlcommon., cma cmxa): \ 390 + OC_OCAML_COMMON_LDFLAGS = += -linkall 431 391 432 - compilerlibs/ocamlcommon.cma: $(COMMON_CMI) $(ALL_CONFIG_CMO) $(COMMON) 433 - $(V_LINKC)$(CAMLC) -a -linkall -o $@ $(COMMON) 434 392 partialclean:: 435 393 rm -f compilerlibs/ocamlcommon.cma 436 394 437 - compilerlibs/ocamlcommon.cmxa: $(COMMON_CMI) $(COMMON:.cmo=.cmx) 438 - $(V_LINKOPT)$(CAMLOPT) -a -linkall -o $@ $(COMMON:.cmo=.cmx) 439 395 partialclean:: 440 396 rm -f compilerlibs/ocamlcommon.cmxa \ 441 397 compilerlibs/ocamlcommon.a compilerlibs/ocamlcommon.lib 442 398 443 399 444 - compilerlibs/ocamlbytecomp.cma: $(BYTECOMP_CMI) $(BYTECOMP) 445 - $(V_LINKC)$(CAMLC) -a -o $@ $(BYTECOMP) 446 400 partialclean:: 447 401 rm -f compilerlibs/ocamlbytecomp.cma 448 402 449 - compilerlibs/ocamlbytecomp.cmxa: $(BYTECOMP_CMI) $(BYTECOMP:.cmo=.cmx) 450 - $(V_LINKOPT)$(CAMLOPT) -a $(OCAML_NATDYNLINKOPTS) -o $@ $(BYTECOMP:.cmo=.cmx) 451 403 partialclean:: 452 404 rm -f compilerlibs/ocamlbytecomp.cmxa \ 453 405 compilerlibs/ocamlbytecomp.a compilerlibs/ocamlbytecomp.lib 454 406 455 407 456 - compilerlibs/ocamlmiddleend.cma: $(MIDDLE_END_CMI) $(MIDDLE_END) 457 - $(V_LINKC)$(CAMLC) -a -o $@ $(MIDDLE_END) 458 - compilerlibs/ocamlmiddleend.cmxa: $(MIDDLE_END_CMI) $(MIDDLE_END:%.cmo=%.cmx) 459 - $(V_LINKOPT)$(CAMLOPT) -a -o $@ $(MIDDLE_END:%.cmo=%.cmx) 460 408 partialclean:: 461 409 rm -f compilerlibs/ocamlmiddleend.cma \ 462 410 compilerlibs/ocamlmiddleend.cmxa \ ··· 464 412 compilerlibs/ocamlmiddleend.lib 465 413 466 414 467 - compilerlibs/ocamloptcomp.cma: $(OPTCOMP_CMI) $(OPTCOMP) 468 - $(V_LINKC)$(CAMLC) -a -o $@ $(OPTCOMP) 469 415 partialclean:: 470 416 rm -f compilerlibs/ocamloptcomp.cma 471 417 472 - compilerlibs/ocamloptcomp.cmxa: $(OPTCOMP_CMI) $(OPTCOMP:.cmo=.cmx) 473 - $(V_LINKOPT)$(CAMLOPT) -a -o $@ $(OPTCOMP:.cmo=.cmx) 474 418 partialclean:: 475 419 rm -f compilerlibs/ocamloptcomp.cmxa \ 476 420 compilerlibs/ocamloptcomp.a compilerlibs/ocamloptcomp.lib 477 421 478 422 479 - compilerlibs/ocamltoplevel.cma: $(TOPLEVEL_CMI) $(TOPLEVEL) 480 - $(V_LINKC)$(CAMLC) -a -o $@ -I toplevel/byte $(TOPLEVEL) 423 + compilerlibs/ocamltoplevel.cma: VPATH += toplevel/byte 481 424 partialclean:: 482 425 rm -f compilerlibs/ocamltoplevel.cma 483 426 484 - compilerlibs/ocamltoplevel.cmxa: $(OPTTOPLEVEL_CMI) $(OPTTOPLEVEL:.cmo=.cmx) 485 - $(V_LINKOPT)$(CAMLOPT) -a -o $@ -I toplevel/native $(OPTTOPLEVEL:.cmo=.cmx) 427 + compilerlibs/ocamltoplevel.cmxa: VPATH += toplevel/native 486 428 partialclean:: 487 429 rm -f compilerlibs/ocamltoplevel.cmxa \ 488 430 compilerlibs/ocamltoplevel.a compilerlibs/ocamltoplevel.lib