dylan-lang / opendylan

Open Dylan compiler and IDE
http://opendylan.org/
Other
458 stars 69 forks source link

[LLVM] Get the LLVM back-end and run-time working with MPS #961

Open waywardmonkeys opened 9 years ago

waywardmonkeys commented 9 years ago

One of the Ravenbrook folks has expressed an interest in knowing what's involved in getting the Open Dylan LLVM back-end and run-time working with MPS.

This will be a meta-issue to try to track that.

waywardmonkeys commented 9 years ago

I'm doing this work on https://github.com/waywardmonkeys/opendylan/tree/dev/mps-and-llvm for now ... I reserve the right to rebase and force-push that branch, so let me know (via this bug) if you do anything with it or want a change incorporated.

waywardmonkeys commented 9 years ago

With the changes currently on that branch, the next set of failures to resolve are these during linking:

  "_Prunning_dylan_spy_functionQ", referenced from:

      _primitive_alloc in libdylan-llvm-runtime.a(collector.o)
      _primitive_alloc_s1 in libdylan-llvm-runtime.a(collector.o)
      _primitive_alloc_s2 in libdylan-llvm-runtime.a(collector.o)
      _primitive_alloc_s in libdylan-llvm-runtime.a(collector.o)
      _primitive_alloc_r in libdylan-llvm-runtime.a(collector.o)
      _primitive_alloc_rf in libdylan-llvm-runtime.a(collector.o)
      _primitive_alloc_s_r in libdylan-llvm-runtime.a(collector.o)
      ...

  "_dylan_false", referenced from:

      _MMReserveObject in libdylan-llvm-runtime.a(collector.o)
      _MMReserveLeaf in libdylan-llvm-runtime.a(collector.o)
      _MMReserveExactAWL in libdylan-llvm-runtime.a(collector.o)
      _MMReserveWeakAWL in libdylan-llvm-runtime.a(collector.o)

  "_dylan_signal_low_memory", referenced from:

      _MMReserveObject in libdylan-llvm-runtime.a(collector.o)
      _MMReserveLeaf in libdylan-llvm-runtime.a(collector.o)
      _MMReserveExactAWL in libdylan-llvm-runtime.a(collector.o)
      _MMReserveWeakAWL in libdylan-llvm-runtime.a(collector.o)

  "_mps_lib_abort", referenced from:

      _init_error in libdylan-llvm-runtime.a(collector.o)
      _dylan_init_memory_manager in libdylan-llvm-runtime.a(collector.o)
      _mps__malloc in libdylan-llvm-runtime.a(collector.o)
      _mps__free in libdylan-llvm-runtime.a(collector.o)
      _defaultHandler in libdylan-llvm-runtime.a(collector.o)

      _report_error in libdylan-llvm-runtime.a(heap-utils.o)

  "_mps_lib_fputs_", referenced from:

      _display_wrapper_stats in libdylan-llvm-runtime.a(heap-order1.o)
      _display_wrapper_breakpoints in libdylan-llvm-runtime.a(heap-display.o)

      _display_if_correct_size in libdylan-llvm-runtime.a(heap-order2.o)

These can be seen by building a dylan-compiler from the branch and then:

    $ make-dylan-app hello
    $ cd hello
    $ path/to/your/new/dylan-compiler -build hello -back-end llvm -verbose
waywardmonkeys commented 9 years ago

Updated the branch. Now linking fails with just these 2:

Undefined symbols for architecture i386:
  "_dylan_false", referenced from:

      _MMReserveObject in libdylan-llvm-runtime.a(collector.o)
      _MMReserveLeaf in libdylan-llvm-runtime.a(collector.o)
      _MMReserveExactAWL in libdylan-llvm-runtime.a(collector.o)
      _MMReserveWeakAWL in libdylan-llvm-runtime.a(collector.o)

  "_dylan_signal_low_memory", referenced from:

      _MMReserveObject in libdylan-llvm-runtime.a(collector.o)
      _MMReserveLeaf in libdylan-llvm-runtime.a(collector.o)
      _MMReserveExactAWL in libdylan-llvm-runtime.a(collector.o)
      _MMReserveWeakAWL in libdylan-llvm-runtime.a(collector.o)

ld: symbol(s) not found for architecture i386

Will continue another day.

waywardmonkeys commented 8 years ago

Filed #1024 for the dylan_false issue.