Create canonical name -> file name symlink in the symbol directory

We have two runtime APEX files: com.android.runtime.debug.apex and
com.android.runtime.release.apex. For a device, only either of them is
selected and mounted on the canonical path /apex/com.android.runtime.

The symbol files for the two APEX modules are installed to
$(TARGET_OUT_UNSTRIPPED)/apex/com.android.runtime.{release|debug}.
However, since the APEXes are mounted to /apex/com.android.runtime
(without .debug or .release suffix), the stack trace for the files shows
/apex/com.android.runtime path, not the .release or .debug path. As a
result, a tool like 'stack' fails to find the symbols for the libs in
the runtime APEX.

This problem is solved by creating a symlink com.android.runtime in the
symbol directory ($(TARGET_OUT_UNSTRIPPED)) that points either
com.android.runtime.debug or com.android.runtime.release depending on
which variant of the runtime APEX is selected for the device.

Bug: 120846816
Test: m and inspect that symbol files exist under
$(PRODUCT_OUT)/symbols/apex/com.android.runtime/

Change-Id: If3969736ed1c51b8375974dfa320cd798dbd730c
1 file changed