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.

Merge pull request #12586 from shindere/merge-compilerlibs-makefile

Merge compilerlibs/Makefile.compilerlibs into the root Makefile

authored by

Sébastien Hinderer and committed by
GitHub
14a3ce63 e397ed28

+573 -507
+3 -2
Changes
··· 382 382 383 383 ### Build system: 384 384 385 - - #12198, #12321: continue the merge of the sub-makefiles into the root Makefile 386 - started with #11243, #11248, #11268, #11420 and #11675. 385 + - #12198, #12321, #12586: continue the merge of the sub-makefiles 386 + into the root Makefile started with #11243, #11248, #11268, #11420 387 + and #11675. 387 388 (Sébastien Hinderer, review by David Allsopp and Florian Angeletti) 388 389 389 390 - #12569, #12570: remove 'otherlibraries' as a prerequisite for 'runtop';
+445 -2
Makefile
··· 60 60 61 61 expunge := expunge$(EXE) 62 62 63 - # targets for the compilerlibs/*.{cma,cmxa} archives 64 - include compilerlibs/Makefile.compilerlibs 63 + # Targets and dependencies for the compilerlibs/*.{cma,cmxa} archives 64 + 65 + utils_SOURCES = $(addprefix utils/, \ 66 + config.mli config.ml \ 67 + build_path_prefix_map.mli build_path_prefix_map.ml \ 68 + misc.mli misc.ml \ 69 + identifiable.mli identifiable.ml \ 70 + numbers.mli numbers.ml \ 71 + arg_helper.mli arg_helper.ml \ 72 + local_store.mli local_store.ml \ 73 + load_path.mli load_path.ml \ 74 + clflags.mli clflags.ml \ 75 + profile.mli profile.ml \ 76 + terminfo.mli terminfo.ml \ 77 + ccomp.mli ccomp.ml \ 78 + warnings.mli warnings.ml \ 79 + consistbl.mli consistbl.ml \ 80 + strongly_connected_components.mli strongly_connected_components.ml \ 81 + targetint.mli targetint.ml \ 82 + int_replace_polymorphic_compare.mli int_replace_polymorphic_compare.ml \ 83 + domainstate.mli domainstate.ml \ 84 + binutils.mli binutils.ml \ 85 + lazy_backtrack.mli lazy_backtrack.ml \ 86 + diffing.mli diffing.ml \ 87 + diffing_with_keys.mli diffing_with_keys.ml) 88 + 89 + parsing_SOURCES = $(addprefix parsing/, \ 90 + location.mli location.ml \ 91 + unit_info.mli unit_info.ml \ 92 + asttypes.mli \ 93 + longident.mli longident.ml \ 94 + parsetree.mli \ 95 + docstrings.mli docstrings.ml \ 96 + syntaxerr.mli syntaxerr.ml \ 97 + ast_helper.mli ast_helper.ml \ 98 + camlinternalMenhirLib.mli camlinternalMenhirLib.ml \ 99 + parser.mly \ 100 + lexer.mll \ 101 + pprintast.mli pprintast.ml \ 102 + parse.mli parse.ml \ 103 + printast.mli printast.ml \ 104 + ast_mapper.mli ast_mapper.ml \ 105 + ast_iterator.mli ast_iterator.ml \ 106 + attr_helper.mli attr_helper.ml \ 107 + builtin_attributes.mli builtin_attributes.ml \ 108 + ast_invariants.mli ast_invariants.ml \ 109 + depend.mli depend.ml) 110 + 111 + typing_SOURCES = \ 112 + typing/annot.mli \ 113 + typing/ident.mli typing/ident.ml \ 114 + typing/path.mli typing/path.ml \ 115 + typing/primitive.mli typing/primitive.ml \ 116 + typing/type_immediacy.mli typing/type_immediacy.ml \ 117 + typing/outcometree.mli \ 118 + typing/shape.mli typing/shape.ml \ 119 + typing/types.mli typing/types.ml \ 120 + typing/btype.mli typing/btype.ml \ 121 + typing/oprint.mli typing/oprint.ml \ 122 + typing/subst.mli typing/subst.ml \ 123 + typing/predef.mli typing/predef.ml \ 124 + typing/datarepr.mli typing/datarepr.ml \ 125 + file_formats/cmi_format.mli file_formats/cmi_format.ml \ 126 + typing/persistent_env.mli typing/persistent_env.ml \ 127 + typing/env.mli typing/env.ml \ 128 + typing/errortrace.mli typing/errortrace.ml \ 129 + typing/typedtree.mli typing/typedtree.ml \ 130 + typing/signature_group.mli typing/signature_group.ml \ 131 + typing/printtyped.mli typing/printtyped.ml \ 132 + typing/ctype.mli typing/ctype.ml \ 133 + typing/printtyp.mli typing/printtyp.ml \ 134 + typing/includeclass.mli typing/includeclass.ml \ 135 + typing/mtype.mli typing/mtype.ml \ 136 + typing/envaux.mli typing/envaux.ml \ 137 + typing/includecore.mli typing/includecore.ml \ 138 + typing/tast_iterator.mli typing/tast_iterator.ml \ 139 + typing/tast_mapper.mli typing/tast_mapper.ml \ 140 + typing/stypes.mli typing/stypes.ml \ 141 + file_formats/cmt_format.mli file_formats/cmt_format.ml \ 142 + typing/cmt2annot.mli typing/cmt2annot.ml \ 143 + typing/untypeast.mli typing/untypeast.ml \ 144 + typing/includemod.mli typing/includemod.ml \ 145 + typing/includemod_errorprinter.mli typing/includemod_errorprinter.ml \ 146 + typing/typetexp.mli typing/typetexp.ml \ 147 + typing/printpat.mli typing/printpat.ml \ 148 + typing/patterns.mli typing/patterns.ml \ 149 + typing/parmatch.mli typing/parmatch.ml \ 150 + typing/typedecl_properties.mli typing/typedecl_properties.ml \ 151 + typing/typedecl_variance.mli typing/typedecl_variance.ml \ 152 + typing/typedecl_unboxed.mli typing/typedecl_unboxed.ml \ 153 + typing/typedecl_immediacy.mli typing/typedecl_immediacy.ml \ 154 + typing/typedecl_separability.mli typing/typedecl_separability.ml \ 155 + typing/typeopt.mli typing/typeopt.ml \ 156 + typing/typedecl.mli typing/typedecl.ml \ 157 + typing/rec_check.mli typing/rec_check.ml \ 158 + typing/typecore.mli typing/typecore.ml \ 159 + typing/typeclass.mli typing/typeclass.ml \ 160 + typing/typemod.mli typing/typemod.ml 161 + 162 + lambda_SOURCES = $(addprefix lambda/, \ 163 + debuginfo.mli debuginfo.ml \ 164 + lambda.mli lambda.ml \ 165 + printlambda.mli printlambda.ml \ 166 + switch.mli switch.ml \ 167 + matching.mli matching.ml \ 168 + translobj.mli translobj.ml \ 169 + translattribute.mli translattribute.ml \ 170 + translprim.mli translprim.ml \ 171 + translcore.mli translcore.ml \ 172 + translclass.mli translclass.ml \ 173 + translmod.mli translmod.ml \ 174 + tmc.mli tmc.ml \ 175 + simplif.mli simplif.ml \ 176 + runtimedef.mli runtimedef.ml) 177 + 178 + comp_SOURCES = \ 179 + file_formats/cmo_format.mli \ 180 + file_formats/cmx_format.mli \ 181 + file_formats/cmxs_format.mli \ 182 + bytecomp/meta.mli bytecomp/meta.ml \ 183 + bytecomp/opcodes.mli bytecomp/opcodes.ml \ 184 + bytecomp/bytesections.mli bytecomp/bytesections.ml \ 185 + bytecomp/dll.mli bytecomp/dll.ml \ 186 + bytecomp/symtable.mli bytecomp/symtable.ml \ 187 + driver/pparse.mli driver/pparse.ml \ 188 + driver/compenv.mli driver/compenv.ml \ 189 + driver/main_args.mli driver/main_args.ml \ 190 + driver/compmisc.mli driver/compmisc.ml \ 191 + driver/makedepend.mli driver/makedepend.ml \ 192 + driver/compile_common.mli driver/compile_common.ml 193 + # All file format descriptions (including cmx{,s}) are in the 194 + # ocamlcommon library so that ocamlobjinfo can depend on them. 195 + 196 + ocamlcommon_SOURCES = \ 197 + $(utils_SOURCES) $(parsing_SOURCES) $(typing_SOURCES) \ 198 + $(lambda_SOURCES) $(comp_SOURCES) 199 + 200 + ocamlbytecomp_SOURCES = \ 201 + bytecomp/instruct.mli bytecomp/instruct.ml \ 202 + bytecomp/bytegen.mli bytecomp/bytegen.ml \ 203 + bytecomp/printinstr.mli bytecomp/printinstr.ml \ 204 + bytecomp/emitcode.mli bytecomp/emitcode.ml \ 205 + bytecomp/bytelink.mli bytecomp/bytelink.ml \ 206 + bytecomp/bytelibrarian.mli bytecomp/bytelibrarian.ml \ 207 + bytecomp/bytepackager.mli bytecomp/bytepackager.ml \ 208 + driver/errors.mli driver/errors.ml \ 209 + driver/compile.mli driver/compile.ml \ 210 + driver/maindriver.mli driver/maindriver.ml 211 + 212 + intel_SOURCES = \ 213 + x86_ast.mli \ 214 + x86_proc.mli x86_proc.ml \ 215 + x86_dsl.mli x86_dsl.ml \ 216 + x86_gas.mli x86_gas.ml \ 217 + x86_masm.mli x86_masm.ml 218 + 219 + asmcomp_SOURCES = \ 220 + $(addprefix asmcomp/, $(arch_specific_SOURCES)) \ 221 + asmcomp/arch.mli asmcomp/arch.ml \ 222 + asmcomp/cmm.mli asmcomp/cmm.ml \ 223 + asmcomp/printcmm.mli asmcomp/printcmm.ml \ 224 + asmcomp/reg.mli asmcomp/reg.ml \ 225 + asmcomp/mach.mli asmcomp/mach.ml \ 226 + asmcomp/proc.mli asmcomp/proc.ml \ 227 + asmcomp/strmatch.mli asmcomp/strmatch.ml \ 228 + asmcomp/cmmgen_state.mli asmcomp/cmmgen_state.ml \ 229 + asmcomp/cmm_helpers.mli asmcomp/cmm_helpers.ml \ 230 + asmcomp/afl_instrument.mli asmcomp/afl_instrument.ml \ 231 + asmcomp/thread_sanitizer.mli asmcomp/thread_sanitizer.ml \ 232 + asmcomp/cmmgen.mli asmcomp/cmmgen.ml \ 233 + asmcomp/cmm_invariants.mli asmcomp/cmm_invariants.ml \ 234 + asmcomp/interval.mli asmcomp/interval.ml \ 235 + asmcomp/printmach.mli asmcomp/printmach.ml \ 236 + asmcomp/dataflow.mli asmcomp/dataflow.ml \ 237 + asmcomp/polling.mli asmcomp/polling.ml \ 238 + asmcomp/selectgen.mli asmcomp/selectgen.ml \ 239 + asmcomp/selection.mli asmcomp/selection.ml \ 240 + asmcomp/comballoc.mli asmcomp/comballoc.ml \ 241 + asmcomp/CSEgen.mli asmcomp/CSEgen.ml \ 242 + asmcomp/CSE.mli asmcomp/CSE.ml \ 243 + asmcomp/liveness.mli asmcomp/liveness.ml \ 244 + asmcomp/spill.mli asmcomp/spill.ml \ 245 + asmcomp/split.mli asmcomp/split.ml \ 246 + asmcomp/interf.mli asmcomp/interf.ml \ 247 + asmcomp/coloring.mli asmcomp/coloring.ml \ 248 + asmcomp/linscan.mli asmcomp/linscan.ml \ 249 + asmcomp/reloadgen.mli asmcomp/reloadgen.ml \ 250 + asmcomp/reload.mli asmcomp/reload.ml \ 251 + asmcomp/deadcode.mli asmcomp/deadcode.ml \ 252 + asmcomp/stackframegen.mli asmcomp/stackframegen.ml \ 253 + asmcomp/stackframe.mli asmcomp/stackframe.ml \ 254 + asmcomp/linear.mli asmcomp/linear.ml \ 255 + asmcomp/printlinear.mli asmcomp/printlinear.ml \ 256 + asmcomp/linearize.mli asmcomp/linearize.ml \ 257 + file_formats/linear_format.mli file_formats/linear_format.ml \ 258 + asmcomp/schedgen.mli asmcomp/schedgen.ml \ 259 + asmcomp/scheduling.mli asmcomp/scheduling.ml \ 260 + asmcomp/branch_relaxation.mli asmcomp/branch_relaxation.ml \ 261 + asmcomp/emitaux.mli asmcomp/emitaux.ml \ 262 + asmcomp/emit.mli asmcomp/emit.ml \ 263 + asmcomp/asmgen.mli asmcomp/asmgen.ml \ 264 + asmcomp/asmlink.mli asmcomp/asmlink.ml \ 265 + asmcomp/asmlibrarian.mli asmcomp/asmlibrarian.ml \ 266 + asmcomp/asmpackager.mli asmcomp/asmpackager.ml \ 267 + driver/opterrors.mli driver/opterrors.ml \ 268 + driver/optcompile.mli driver/optcompile.ml \ 269 + driver/optmaindriver.mli driver/optmaindriver.ml 270 + 271 + # Files under middle_end/ are not to reference files under asmcomp/. 272 + # This ensures that the middle end can be linked (e.g. for objinfo) even when 273 + # the native code compiler is not present for some particular target. 274 + 275 + middle_end_closure_SOURCES = $(addprefix middle_end/closure/, \ 276 + closure.mli closure.ml \ 277 + closure_middle_end.mli closure_middle_end.ml) 278 + 279 + # Owing to dependencies through [Compilenv], which would be 280 + # difficult to remove, some of the lower parts of Flambda (anything that is 281 + # saved in a .cmx file) have to be included in the [MIDDLE_END] stanza, below. 282 + middle_end_flambda_SOURCES = \ 283 + $(addprefix middle_end/flambda/, \ 284 + import_approx.mli import_approx.ml \ 285 + lift_code.mli lift_code.ml \ 286 + closure_conversion_aux.mli closure_conversion_aux.ml \ 287 + closure_conversion.mli closure_conversion.ml \ 288 + initialize_symbol_to_let_symbol.mli initialize_symbol_to_let_symbol.ml \ 289 + lift_let_to_initialize_symbol.mli lift_let_to_initialize_symbol.ml \ 290 + find_recursive_functions.mli find_recursive_functions.ml \ 291 + invariant_params.mli invariant_params.ml \ 292 + inconstant_idents.mli inconstant_idents.ml \ 293 + alias_analysis.mli alias_analysis.ml \ 294 + lift_constants.mli lift_constants.ml \ 295 + share_constants.mli share_constants.ml \ 296 + simplify_common.mli simplify_common.ml \ 297 + remove_unused_arguments.mli remove_unused_arguments.ml \ 298 + remove_unused_closure_vars.mli remove_unused_closure_vars.ml \ 299 + remove_unused_program_constructs.mli remove_unused_program_constructs.ml \ 300 + simplify_boxed_integer_ops.mli simplify_boxed_integer_ops.ml \ 301 + simplify_primitives.mli simplify_primitives.ml \ 302 + inlining_stats_types.mli inlining_stats_types.ml \ 303 + inlining_stats.mli inlining_stats.ml \ 304 + inline_and_simplify_aux.mli inline_and_simplify_aux.ml \ 305 + inlining_decision_intf.mli \ 306 + remove_free_vars_equal_to_args.mli remove_free_vars_equal_to_args.ml \ 307 + extract_projections.mli extract_projections.ml \ 308 + augment_specialised_args.mli augment_specialised_args.ml \ 309 + unbox_free_vars_of_closures.mli unbox_free_vars_of_closures.ml \ 310 + unbox_specialised_args.mli unbox_specialised_args.ml \ 311 + unbox_closures.mli unbox_closures.ml \ 312 + inlining_transforms.mli inlining_transforms.ml \ 313 + inlining_decision.mli inlining_decision.ml \ 314 + inline_and_simplify.mli inline_and_simplify.ml \ 315 + ref_to_variables.mli ref_to_variables.ml \ 316 + flambda_invariants.mli flambda_invariants.ml \ 317 + traverse_for_exported_symbols.mli traverse_for_exported_symbols.ml \ 318 + build_export_info.mli build_export_info.ml \ 319 + closure_offsets.mli closure_offsets.ml \ 320 + un_anf.mli un_anf.ml \ 321 + flambda_to_clambda.mli flambda_to_clambda.ml \ 322 + flambda_middle_end.mli flambda_middle_end.ml \ 323 + simplify_boxed_integer_ops_intf.mli) 324 + 325 + ocamlmiddleend_SOURCES = \ 326 + $(addprefix middle_end/, \ 327 + internal_variable_names.mli internal_variable_names.ml \ 328 + linkage_name.mli linkage_name.ml \ 329 + compilation_unit.mli compilation_unit.ml \ 330 + variable.mli variable.ml \ 331 + $(addprefix flambda/base_types/, \ 332 + closure_element.mli closure_element.ml \ 333 + closure_id.mli closure_id.ml) \ 334 + symbol.mli symbol.ml \ 335 + backend_var.mli backend_var.ml \ 336 + clambda_primitives.mli clambda_primitives.ml \ 337 + printclambda_primitives.mli printclambda_primitives.ml \ 338 + clambda.mli clambda.ml \ 339 + printclambda.mli printclambda.ml \ 340 + semantics_of_primitives.mli semantics_of_primitives.ml \ 341 + convert_primitives.mli convert_primitives.ml \ 342 + $(addprefix flambda/, \ 343 + $(addprefix base_types/, \ 344 + id_types.mli id_types.ml \ 345 + export_id.mli export_id.ml \ 346 + tag.mli tag.ml \ 347 + mutable_variable.mli mutable_variable.ml \ 348 + set_of_closures_id.mli set_of_closures_id.ml \ 349 + set_of_closures_origin.mli set_of_closures_origin.ml \ 350 + closure_origin.mli closure_origin.ml \ 351 + var_within_closure.mli var_within_closure.ml \ 352 + static_exception.mli static_exception.ml) \ 353 + pass_wrapper.mli pass_wrapper.ml \ 354 + allocated_const.mli allocated_const.ml \ 355 + parameter.mli parameter.ml \ 356 + projection.mli projection.ml \ 357 + flambda.mli flambda.ml \ 358 + flambda_iterators.mli flambda_iterators.ml \ 359 + flambda_utils.mli flambda_utils.ml \ 360 + freshening.mli freshening.ml \ 361 + effect_analysis.mli effect_analysis.ml \ 362 + inlining_cost.mli inlining_cost.ml \ 363 + simple_value_approx.mli simple_value_approx.ml \ 364 + export_info.mli export_info.ml \ 365 + export_info_for_pack.mli export_info_for_pack.ml) \ 366 + compilenv.mli compilenv.ml \ 367 + backend_intf.mli) \ 368 + $(middle_end_closure_SOURCES) \ 369 + $(middle_end_flambda_SOURCES) 370 + 371 + ocamloptcomp_SOURCES = $(ocamlmiddleend_SOURCES) $(asmcomp_SOURCES) 372 + 373 + ocamltoplevel_SOURCES = $(addprefix toplevel/, \ 374 + genprintval.mli genprintval.ml \ 375 + topcommon.mli topcommon.ml \ 376 + native/tophooks.mli native/tophooks.ml \ 377 + byte/topeval.mli byte/topeval.ml \ 378 + native/topeval.mli native/topeval.ml \ 379 + byte/trace.mli byte/trace.ml \ 380 + native/trace.mli native/trace.ml \ 381 + toploop.mli toploop.ml \ 382 + topprinters.mli topprinters.ml \ 383 + topdirs.mli topdirs.ml \ 384 + byte/topmain.mli byte/topmain.ml \ 385 + native/topmain.mli native/topmain.ml) 386 + 387 + TOPLEVEL_SHARED_MLIS = topeval.mli trace.mli topmain.mli 388 + TOPLEVEL_SHARED_CMIS = $(TOPLEVEL_SHARED_MLIS:%.mli=%.cmi) 389 + TOPLEVEL_SHARED_ARTEFACTS = $(TOPLEVEL_SHARED_MLIS) $(TOPLEVEL_SHARED_CMIS) 390 + 391 + $(addprefix toplevel/byte/, $(TOPLEVEL_SHARED_CMIS)):\ 392 + toplevel/byte/%.cmi: toplevel/%.cmi 393 + cp $< toplevel/$*.mli $(@D) 394 + 395 + $(addprefix toplevel/native/, $(TOPLEVEL_SHARED_CMIS)):\ 396 + toplevel/native/%.cmi: toplevel/%.cmi 397 + cp $< toplevel/$*.mli $(@D) 398 + 399 + beforedepend:: 400 + cd toplevel ; cp $(TOPLEVEL_SHARED_MLIS) byte/ 401 + cd toplevel ; cp $(TOPLEVEL_SHARED_MLIS) native/ 402 + 403 + partialclean:: 404 + cd toplevel/byte ; rm -f $(TOPLEVEL_SHARED_ARTEFACTS) 405 + cd toplevel/native ; rm -f $(TOPLEVEL_SHARED_ARTEFACTS) 406 + 407 + ALL_CONFIG_CMO = utils/config_main.cmo utils/config_boot.cmo 408 + 409 + utils/config_%.mli: utils/config.mli 410 + cp $^ $@ 411 + 412 + beforedepend:: utils/config_main.mli utils/config_boot.mli 413 + 414 + $(addprefix compilerlibs/ocamlcommon., cma cmxa): \ 415 + OC_OCAML_COMMON_LDFLAGS = += -linkall 416 + 417 + partialclean:: 418 + rm -f compilerlibs/ocamlcommon.cma 419 + 420 + partialclean:: 421 + rm -f compilerlibs/ocamlcommon.cmxa \ 422 + compilerlibs/ocamlcommon.a compilerlibs/ocamlcommon.lib 423 + 424 + 425 + partialclean:: 426 + rm -f compilerlibs/ocamlbytecomp.cma 427 + 428 + partialclean:: 429 + rm -f compilerlibs/ocamlbytecomp.cmxa \ 430 + compilerlibs/ocamlbytecomp.a compilerlibs/ocamlbytecomp.lib 431 + 432 + 433 + partialclean:: 434 + rm -f compilerlibs/ocamlmiddleend.cma \ 435 + compilerlibs/ocamlmiddleend.cmxa \ 436 + compilerlibs/ocamlmiddleend.a \ 437 + compilerlibs/ocamlmiddleend.lib 438 + 439 + 440 + partialclean:: 441 + rm -f compilerlibs/ocamloptcomp.cma 442 + 443 + partialclean:: 444 + rm -f compilerlibs/ocamloptcomp.cmxa \ 445 + compilerlibs/ocamloptcomp.a compilerlibs/ocamloptcomp.lib 446 + 447 + 448 + compilerlibs/ocamltoplevel.cma: VPATH += toplevel/byte 449 + partialclean:: 450 + rm -f compilerlibs/ocamltoplevel.cma 451 + 452 + compilerlibs/ocamltoplevel.cmxa: VPATH += toplevel/native 453 + partialclean:: 454 + rm -f compilerlibs/ocamltoplevel.cmxa \ 455 + compilerlibs/ocamltoplevel.a compilerlibs/ocamltoplevel.lib 65 456 66 457 # The configuration file 67 458 ··· 163 554 164 555 $(foreach PROGRAM, $(OCAML_NATIVE_PROGRAMS),\ 165 556 $(eval $(call OCAML_NATIVE_PROGRAM,$(PROGRAM)))) 557 + 558 + # OCaml libraries that are compiled in both bytecode and native code 559 + 560 + # List of compilerlibs 561 + 562 + COMPILERLIBS = $(addprefix compilerlibs/, \ 563 + ocamlbytecomp \ 564 + ocamlcommon \ 565 + ocamlmiddleend \ 566 + ocamloptcomp \ 567 + ocamltoplevel) 568 + 569 + # Since the compiler libraries are necessarily compiled with boot/ocamlc, 570 + # make sure they *always are*, even when rebuilding a program compiled 571 + # with ./ocamlc (e.g. ocamltex) 572 + 573 + $(COMPILERLIBS:=.cma): \ 574 + CAMLC = $(BOOT_OCAMLC) $(BOOT_STDLIBFLAGS) -use-prims runtime/primitives 575 + 576 + # The following dependency ensures that the two versions of the 577 + # configuration module (the one for the bootstrap compiler and the 578 + # one for the compiler to be installed) are compiled. This is to make 579 + # sure these two versions remain in sync with each other 580 + 581 + compilerlibs/ocamlcommon.cma: $(ALL_CONFIG_CMO) 582 + 583 + OCAML_LIBRARIES = $(COMPILERLIBS) 584 + 585 + $(foreach LIBRARY, $(OCAML_LIBRARIES),\ 586 + $(eval $(call OCAML_LIBRARY,$(LIBRARY)))) 587 + 588 + # OCaml libraries that are compiled only in bytecode 589 + 590 + OCAML_BYTECODE_LIBRARIES = 591 + 592 + $(foreach LIBRARY, $(OCAML_BYTECODE_LIBRARIES),\ 593 + $(eval $(call OCAML_BYTECODE_LIBRARY,$(LIBRARY)))) 594 + 595 + # OCaml libraries that are compiled only in native code 596 + 597 + OCAML_NATIVE_LIBRARIES = 598 + 599 + $(foreach LIBRARY, $(OCAML_NATIVE_LIBRARIES),\ 600 + $(eval $(call OCAML_NATIVE_LIBRARY,$(LIBRARY)))) 166 601 167 602 USE_RUNTIME_PRIMS = -use-prims ../runtime/primitives 168 603 USE_STDLIB = -nostdlib -I ../stdlib ··· 2150 2585 @echo " make install" 2151 2586 @echo "should work." 2152 2587 @false 2588 + 2589 + # We need to express that all the CMX files depend on the native compiler, 2590 + # so that they get invalidated and rebuilt when the compiler is updated 2591 + # This dependency must appear after all the definitions of the 2592 + # _SOURCES variable so that GNU make's secondary expansion mechanism works 2593 + # This is why this dependency is kept at the very end of this file 2594 + 2595 + $(ALL_CMX_FILES): ocamlopt$(EXE)
+3
Makefile.build_config.in
··· 151 151 # Platform-dependent module for ocamlyacc 152 152 ocamlyacc_WSTR_MODULE = @ocamlyacc_wstr_module@ 153 153 154 + # Architecture-specific modules, if any 155 + arch_specific_SOURCES = @arch_specific_SOURCES@ 156 + 154 157 # ThreadSanitizer support enabled 155 158 TSAN=@tsan@ 156 159 # Contains TSan-specific runtime files, or nothing if TSan support is
+107 -15
Makefile.common
··· 231 231 MERGEMANIFESTEXE = $(call if_file_exists, $(1).manifest, \ 232 232 mt -nologo -outputresource:$(1) -manifest $(1).manifest) 233 233 234 - # Macros and rules to compile OCaml programs 234 + # Macros and rules to compile OCaml programs and libraries 235 + 236 + # The following variable is used to accumulate a list of all the CMX 237 + # files that get built. Is is then used in the root Makefile to express 238 + # the dependency on all these files on the native compiler, so that 239 + # they get rebuilt if the native compiler is updated 240 + 241 + ALL_CMX_FILES = 235 242 236 243 # We use secondary expansion here so that variables like 237 244 # foo_LIBRARIES and foo_SOURCES can be defined after the calls ··· 240 247 241 248 .SECONDEXPANSION: 242 249 243 - # Each program foo is characterised by the foo_LIBRARIES and foo_SOURCES 244 - # variables. The following macros provide the infrastructure to build foo 245 - # from the object files whose names are derived from these two 246 - # varialbes. In particular, the following macros define several 247 - # variables whose names are prefixed with foo_ to compute the 248 - # different lists of files used to build foo. 250 + # Definitions that are common to both programs and libraries 249 251 250 - # The first macro, _OCAML_PROGRAM_BASE, is a private macro (hence the _ at the 251 - # beginning of its name) which defines foo_ variables common to both 252 - # bytecode and native programs. The next two macros, OCAML_BYTECODE_PROGRAM 253 - # and OCAML_NATIVE_PROGRAM are used to define programs that are provided 254 - # only in bytecode or native form, respectively. Programs provided 255 - # in both forms should use OCAML_PROGRAM. 256 - 257 - define _OCAML_PROGRAM_BASE 252 + define _OCAML_COMMON_BASE 258 253 $(basename $(notdir $(1)))_C_FILES = \ 259 254 $$(filter %.c, $$($(basename $(notdir $(1)))_SOURCES)) 260 255 $(basename $(notdir $(1)))_MLI_FILES = \ 261 256 $$(filter %.mli, \ 262 257 $$(subst .mly,.mli,\ 263 258 $$($(basename $(notdir $(1)))_SOURCES))) 259 + $(basename $(notdir $(1)))_CMI_FILES = \ 260 + $$(subst .mli,.cmi,$$($(basename $(notdir $(1)))_MLI_FILES)) 264 261 $(basename $(notdir $(1)))_ML_FILES = \ 265 262 $$(filter %.ml, \ 266 263 $$(subst .ml.in,.ml,$$(subst .mll,.ml,$$(subst .mly,.ml,\ ··· 280 277 $(basename $(notdir $(1)))_GENERATED_FILES = \ 281 278 $$($(basename $(notdir $(1)))_SECONDARY_FILES) \ 282 279 $$(patsubst %.mly,%.output, $$($(basename $(notdir $(1)))_MLY_FILES)) 280 + endef # _OCAML_COMMON_BASE 281 + 282 + # Macros to build OCaml programs 283 + 284 + # Each program foo is characterised by the foo_LIBRARIES and foo_SOURCES 285 + # variables. The following macros provide the infrastructure to build foo 286 + # from the object files whose names are derived from these two 287 + # varialbes. In particular, the following macros define several 288 + # variables whose names are prefixed with foo_ to compute the 289 + # different lists of files used to build foo. 290 + 291 + # The first macro, _OCAML_PROGRAM_BASE, is a private macro (hence the _ at the 292 + # beginning of its name) which defines foo_ variables common to both 293 + # bytecode and native programs. The next two macros, OCAML_BYTECODE_PROGRAM 294 + # and OCAML_NATIVE_PROGRAM are used to define programs that are provided 295 + # only in bytecode or native form, respectively. Programs provided 296 + # in both forms should use OCAML_PROGRAM. 297 + 298 + define _OCAML_PROGRAM_BASE 299 + $(eval $(call _OCAML_COMMON_BASE,$(1))) 283 300 endef # _OCAML_PROGRAM_BASE 284 301 285 302 LINK_BYTECODE_PROGRAM =\ ··· 323 340 $$(patsubst %.c,%.n.$(O), $$($(basename $(notdir $(1)))_C_FILES)) 324 341 $(basename $(notdir $(1)))_CMX_FILES = \ 325 342 $$(patsubst %.ml,%.cmx, $$($(basename $(notdir $(1)))_ML_FILES)) 343 + ALL_CMX_FILES += $$($(basename $(notdir $(1)))_CMX_FILES) 326 344 $(basename $(notdir $(1)))_NCOBJS = \ 327 345 $$($(basename $(notdir $(1)))_CMXA_FILES) \ 328 346 $$($(basename $(notdir $(1)))_NO_FILES) \ ··· 342 360 $(eval $(call _OCAML_BYTECODE_PROGRAM,$(1))) 343 361 $(eval $(call _OCAML_NATIVE_PROGRAM,$(1).opt)) 344 362 endef # OCAML_PROGRAM 363 + 364 + # Macros for OCaml libraries, similar to those for OCaml programs 365 + 366 + define _OCAML_LIBRARY_BASE 367 + $(eval $(call _OCAML_COMMON_BASE,$(1))) 368 + endef # _OCAML_LIBRARY_BASE 369 + 370 + LINK_BYTECODE_LIBRARY =\ 371 + $(CAMLC) $(OC_COMMON_LINKFLAGS) $(OC_BYTECODE_LINKFLAGS) 372 + 373 + # The _OCAML_BYTECODE_LIBRARY macro defines a bytecode library but assuming 374 + # that _OCAML_LIBRARY_BASE has already been called. Its public counterpart 375 + # does not rely on this assumption and rather does call _OCAML_LIBRARY_BASE 376 + # itself. 377 + 378 + define _OCAML_BYTECODE_LIBRARY 379 + $(basename $(notdir $(1)))_BYTE_CMI_FILES = \ 380 + $$(foreach F,$$($(basename $(notdir $(1)))_CMI_FILES),\ 381 + $$(if $$(findstring /native/,$$(F)),,$$(F))) 382 + $(basename $(notdir $(1)))_BO_FILES = \ 383 + $$(patsubst %.c,%.b.$(O), $$($(basename $(notdir $(1)))_C_FILES)) 384 + $(basename $(notdir $(1)))_CMO_FILES = \ 385 + $$(patsubst %.ml,%.cmo, \ 386 + $$(foreach F,$$($(basename $(notdir $(1)))_ML_FILES),\ 387 + $$(if $$(findstring /native/,$$(F)),,$$(F)))) 388 + $(basename $(notdir $(1)))_BCOBJS = \ 389 + $$($(basename $(notdir $(1)))_BO_FILES) \ 390 + $$($(basename $(notdir $(1)))_CMO_FILES) 391 + $(1).cma: \ 392 + $$$$($(basename $(notdir $(1)))_BYTE_CMI_FILES) \ 393 + $$$$($(basename $(notdir $(1)))_BCOBJS) 394 + $$(V_LINKC)$$(LINK_BYTECODE_LIBRARY) -a -o $$@ \ 395 + $$($(basename $(notdir $(1)))_BCOBJS) 396 + endef # _OCAML_BYTECODE_LIBRARY 397 + 398 + define OCAML_BYTECODE_LIBRARY 399 + $(eval $(call _OCAML_LIBRARY_BASE,$(1))) 400 + $(eval $(call _OCAML_BYTECODE_LIBRARY,$(1))) 401 + endef # OCAML_BYTECODE_LIBRARY 402 + 403 + LINK_NATIVE_LIBRARY =\ 404 + $(CAMLOPT) $(OC_COMMON_LINKFLAGS) $(OC_NATIVE_LINKFLAGS) 405 + 406 + define _OCAML_NATIVE_LIBRARY 407 + $(basename $(notdir $(1)))_NATIVE_CMI_FILES = \ 408 + $$(foreach F,$$($(basename $(notdir $(1)))_CMI_FILES),\ 409 + $$(if $$(findstring /byte/,$$(F)),,$$(F))) 410 + $(basename $(notdir $(1)))_NO_FILES = \ 411 + $$(patsubst %.c,%.n.$(O), $$($(basename $(notdir $(1)))_C_FILES)) 412 + $(basename $(notdir $(1)))_CMX_FILES = \ 413 + $$(patsubst %.ml,%.cmx, \ 414 + $$(foreach F,$$($(basename $(notdir $(1)))_ML_FILES),\ 415 + $$(if $$(findstring /byte/,$$(F)),,$$(F)))) 416 + ALL_CMX_FILES += $$($(basename $(notdir $(1)))_CMX_FILES) 417 + $(basename $(notdir $(1)))_NCOBJS = \ 418 + $$($(basename $(notdir $(1)))_NO_FILES) \ 419 + $$($(basename $(notdir $(1)))_CMX_FILES) 420 + $(1).cmxa: \ 421 + $$$$($(basename $(notdir $(1)))_NATIVE_CMI_FILES) \ 422 + $$$$($(basename $(notdir $(1)))_NCOBJS) 423 + $$(V_LINKOPT)$$(LINK_NATIVE_LIBRARY) -a -o $$@ \ 424 + $$($(basename $(notdir $(1)))_NCOBJS) 425 + endef # _OCAML_NATIVE_LIBRARY 426 + 427 + define OCAML_NATIVE_LIBRARY 428 + $(eval $(call _OCAML_LIBRARY_BASE,$(1))) 429 + $(eval $(call _OCAML_NATIVE_LIBRARY,$(1))) 430 + endef # OCAML_NATIVE_LIBRARY 431 + 432 + define OCAML_LIBRARY 433 + $(eval $(call _OCAML_LIBRARY_BASE,$(1))) 434 + $(eval $(call _OCAML_BYTECODE_LIBRARY,$(1))) 435 + $(eval $(call _OCAML_NATIVE_LIBRARY,$(1))) 436 + endef # OCAML_LIBRARY 345 437 346 438 # Installing a bytecode executable, with debug information removed 347 439 define INSTALL_STRIPPED_BYTE_PROG
-488
compilerlibs/Makefile.compilerlibs
··· 1 - #************************************************************************** 2 - #* * 3 - #* OCaml * 4 - #* * 5 - #* Xavier Leroy, projet Cristal, INRIA Rocquencourt * 6 - #* * 7 - #* Copyright 1999 Institut National de Recherche en Informatique et * 8 - #* en Automatique. * 9 - #* * 10 - #* All rights reserved. This file is distributed under the terms of * 11 - #* the GNU Lesser General Public License version 2.1, with the * 12 - #* special exception on linking described in the file LICENSE. * 13 - #* * 14 - #************************************************************************** 15 - 16 - # Targets and dependencies for compilerlibs archives 17 - 18 - # This file is meant to be included from the root Makefile, not to be 19 - # executed directly (this is why it is not simply named Makefile). 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. 26 - 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 = 51 - 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 126 - 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 = 143 - 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 160 - # All file format descriptions (including cmx{,s}) are in the 161 - # ocamlcommon library so that ocamlobjinfo can depend on them. 162 - 163 - COMMON_CMI = $(UTILS_CMI) $(PARSING_CMI) $(TYPING_CMI) $(LAMBDA_CMI) $(COMP_CMI) 164 - 165 - COMMON = $(UTILS) $(PARSING) $(TYPING) $(LAMBDA) $(COMP) 166 - 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 187 - 188 - ARCH_SPECIFIC_ASMCOMP = 189 - ARCH_SPECIFIC_ASMCOMP_CMI = 190 - ifeq ($(ARCH),i386) 191 - ARCH_SPECIFIC_ASMCOMP = $(INTEL_ASM) 192 - ARCH_SPECIFIC_ASMCOMP_CMI = $(INTEL_ASM_CMI) 193 - endif 194 - ifeq ($(ARCH),amd64) 195 - ARCH_SPECIFIC_ASMCOMP = $(INTEL_ASM) 196 - ARCH_SPECIFIC_ASMCOMP_CMI = $(INTEL_ASM_CMI) 197 - endif 198 - 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) 251 - 252 - # Files under middle_end/ are not to reference files under asmcomp/. 253 - # This ensures that the middle end can be linked (e.g. for objinfo) even when 254 - # the native code compiler is not present for some particular target. 255 - 256 - MIDDLE_END_CLOSURE = \ 257 - middle_end/closure/closure.cmo \ 258 - middle_end/closure/closure_middle_end.cmo 259 - MIDDLE_END_CLOSURE_CMI = 260 - 261 - # Owing to dependencies through [Compilenv], which would be 262 - # difficult to remove, some of the lower parts of Flambda (anything that is 263 - # 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) 351 - 352 - OPTCOMP = $(MIDDLE_END) $(ASMCOMP) 353 - OPTCOMP_CMI = $(MIDDLE_END_CMI) $(ASMCOMP_CMI) 354 - 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 372 - 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 392 - 393 - TOPLEVEL_SHARED_MLIS = topeval.mli trace.mli topmain.mli 394 - TOPLEVEL_SHARED_CMIS = $(TOPLEVEL_SHARED_MLIS:%.mli=%.cmi) 395 - TOPLEVEL_SHARED_ARTEFACTS = $(TOPLEVEL_SHARED_MLIS) $(TOPLEVEL_SHARED_CMIS) 396 - 397 - $(addprefix toplevel/byte/, $(TOPLEVEL_SHARED_CMIS)):\ 398 - toplevel/byte/%.cmi: toplevel/%.cmi 399 - cp $< toplevel/$*.mli $(@D) 400 - 401 - $(addprefix toplevel/native/, $(TOPLEVEL_SHARED_CMIS)):\ 402 - toplevel/native/%.cmi: toplevel/%.cmi 403 - cp $< toplevel/$*.mli $(@D) 404 - 405 - beforedepend:: 406 - cd toplevel ; cp $(TOPLEVEL_SHARED_MLIS) byte/ 407 - cd toplevel ; cp $(TOPLEVEL_SHARED_MLIS) native/ 408 - 409 - partialclean:: 410 - cd toplevel/byte ; rm -f $(TOPLEVEL_SHARED_ARTEFACTS) 411 - cd toplevel/native ; rm -f $(TOPLEVEL_SHARED_ARTEFACTS) 412 - 413 - $(COMMON:.cmo=.cmx) $(BYTECOMP:.cmo=.cmx) $(OPTCOMP:.cmo=.cmx): ocamlopt$(EXE) 414 - $(OPTTOPLEVEL:.cmo=.cmx): ocamlopt$(EXE) 415 - 416 - ALL_CONFIG_CMO = utils/config_main.cmo utils/config_boot.cmo 417 - 418 - utils/config_%.mli: utils/config.mli 419 - cp $^ $@ 420 - 421 - beforedepend:: utils/config_main.mli utils/config_boot.mli 422 - 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 431 - 432 - compilerlibs/ocamlcommon.cma: $(COMMON_CMI) $(ALL_CONFIG_CMO) $(COMMON) 433 - $(V_LINKC)$(CAMLC) -a -linkall -o $@ $(COMMON) 434 - partialclean:: 435 - rm -f compilerlibs/ocamlcommon.cma 436 - 437 - compilerlibs/ocamlcommon.cmxa: $(COMMON_CMI) $(COMMON:.cmo=.cmx) 438 - $(V_LINKOPT)$(CAMLOPT) -a -linkall -o $@ $(COMMON:.cmo=.cmx) 439 - partialclean:: 440 - rm -f compilerlibs/ocamlcommon.cmxa \ 441 - compilerlibs/ocamlcommon.a compilerlibs/ocamlcommon.lib 442 - 443 - 444 - compilerlibs/ocamlbytecomp.cma: $(BYTECOMP_CMI) $(BYTECOMP) 445 - $(V_LINKC)$(CAMLC) -a -o $@ $(BYTECOMP) 446 - partialclean:: 447 - rm -f compilerlibs/ocamlbytecomp.cma 448 - 449 - compilerlibs/ocamlbytecomp.cmxa: $(BYTECOMP_CMI) $(BYTECOMP:.cmo=.cmx) 450 - $(V_LINKOPT)$(CAMLOPT) -a $(OCAML_NATDYNLINKOPTS) -o $@ $(BYTECOMP:.cmo=.cmx) 451 - partialclean:: 452 - rm -f compilerlibs/ocamlbytecomp.cmxa \ 453 - compilerlibs/ocamlbytecomp.a compilerlibs/ocamlbytecomp.lib 454 - 455 - 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 - partialclean:: 461 - rm -f compilerlibs/ocamlmiddleend.cma \ 462 - compilerlibs/ocamlmiddleend.cmxa \ 463 - compilerlibs/ocamlmiddleend.a \ 464 - compilerlibs/ocamlmiddleend.lib 465 - 466 - 467 - compilerlibs/ocamloptcomp.cma: $(OPTCOMP_CMI) $(OPTCOMP) 468 - $(V_LINKC)$(CAMLC) -a -o $@ $(OPTCOMP) 469 - partialclean:: 470 - rm -f compilerlibs/ocamloptcomp.cma 471 - 472 - compilerlibs/ocamloptcomp.cmxa: $(OPTCOMP_CMI) $(OPTCOMP:.cmo=.cmx) 473 - $(V_LINKOPT)$(CAMLOPT) -a -o $@ $(OPTCOMP:.cmo=.cmx) 474 - partialclean:: 475 - rm -f compilerlibs/ocamloptcomp.cmxa \ 476 - compilerlibs/ocamloptcomp.a compilerlibs/ocamloptcomp.lib 477 - 478 - 479 - compilerlibs/ocamltoplevel.cma: $(TOPLEVEL_CMI) $(TOPLEVEL) 480 - $(V_LINKC)$(CAMLC) -a -o $@ -I toplevel/byte $(TOPLEVEL) 481 - partialclean:: 482 - rm -f compilerlibs/ocamltoplevel.cma 483 - 484 - compilerlibs/ocamltoplevel.cmxa: $(OPTTOPLEVEL_CMI) $(OPTTOPLEVEL:.cmo=.cmx) 485 - $(V_LINKOPT)$(CAMLOPT) -a -o $@ -I toplevel/native $(OPTTOPLEVEL:.cmo=.cmx) 486 - partialclean:: 487 - rm -f compilerlibs/ocamltoplevel.cmxa \ 488 - compilerlibs/ocamltoplevel.a compilerlibs/ocamltoplevel.lib
+9
configure
··· 883 883 system 884 884 model 885 885 arch64 886 + arch_specific_SOURCES 886 887 arch 887 888 SO 888 889 runtime_asm_objects ··· 3306 3307 # Note: This is present for the flexdll bootstrap where it exposed as the old 3307 3308 # TOOLPREF variable. It would be better if flexdll where updated to require 3308 3309 # WINDRES instead. 3310 + 3309 3311 3310 3312 3311 3313 ··· 15574 15576 ;; #( 15575 15577 *) : 15576 15578 ;; 15579 + esac 15580 + 15581 + case $arch in #( 15582 + amd64) : 15583 + arch_specific_SOURCES='$(intel_SOURCES)' ;; #( 15584 + *) : 15585 + arch_specific_SOURCES='' ;; 15577 15586 esac 15578 15587 15579 15588 native_cflags=''
+6
configure.ac
··· 117 117 AC_SUBST([runtime_asm_objects]) 118 118 AC_SUBST([SO]) 119 119 AC_SUBST([arch]) 120 + AC_SUBST([arch_specific_SOURCES]) 120 121 AC_SUBST([arch64]) 121 122 AC_SUBST([model]) 122 123 AC_SUBST([system]) ··· 1338 1339 [riscv64-*-linux*], 1339 1340 [has_native_backend=yes; arch=riscv; model=riscv64; system=linux] 1340 1341 ) 1342 + 1343 + AS_CASE([$arch], 1344 + [amd64], 1345 + [arch_specific_SOURCES='$(intel_SOURCES)'], 1346 + [arch_specific_SOURCES='']) 1341 1347 1342 1348 native_cflags='' 1343 1349 native_cppflags="-DTARGET_${arch} -DMODEL_${model} -DSYS_${system}"