Skip to content

Commit

Permalink
src/Makefile: Embed DWARF debug info as binary blob
Browse files Browse the repository at this point in the history
  • Loading branch information
lukego committed Apr 25, 2018
1 parent 9b5ab0a commit 02062e9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ LJCORE_O= lj_gc.o lj_err.o lj_char.o lj_bc.o lj_obj.o lj_buf.o \
lj_ctype.o lj_cdata.o lj_cconv.o lj_ccall.o lj_ccallback.o \
lj_carith.o lj_clib.o lj_cparse.o \
lj_lib.o lj_alloc.o lib_aux.o \
lj_dwarf_dwo.o \
$(LJLIB_O) lib_init.o

DWARF_DWO= lj_dwarf.dwo
Expand Down Expand Up @@ -383,6 +384,12 @@ $(DWARF_DWO): %.dwo: %.c
$(E) "CC(debug) $@"
$(Q)$(TARGET_CC) -g3 -fno-eliminate-unused-debug-types -gsplit-dwarf -c $<

# Embed DWARF debug information as binary data available to raptorjit.
lj_dwarf_dwo.o lj_dwarf_dwo_dyn.o: $(DWARF_DWO)
$(E) "EMBED $@"
$(Q)$(LD) -r -b binary -o $@ $<
$(Q)$(LD) -shared -b binary -o $(@:.o=_dyn.o) $<

include Makefile.dep

##############################################################################
Expand Down

0 comments on commit 02062e9

Please sign in to comment.