Skip to content

Draft: Add D compiler

Confirmed to work on amd64.

object.d:

test.d:

int f(int b, int c) {
  return b + c;
}

$ xtensa-lx106-elf-gdc -O3 test.d object.d -c -fno-druntime

$ size test.o 
   text	   data	    bss	    dec	    hex	filename
      4	      0	      0	      4	      4	test.o
$
$ xtensa-lx106-elf-size test.o 
   text	   data	    bss	    dec	    hex	filename
      4	      0	      0	      4	      4	test.o
$
$ xtensa-lx106-elf-objdump -d --demangle=dlang test.o 

test.o:     file format elf32-xtensa-le


Disassembly of section .text:

00000000 <test.f(int, int)>:
   0:	223a      	add.n	a2, a2, a3
   2:	f00d      	ret.n

Merge request reports

Loading