trusty: build rust with frame pointer

Force code generation to use frame pointers for rust to support stack-traces and some debug tools.

Example of backtrace from panic! without change:

secure os: Backtrace for thread: trusty_app_69_3c322c86-b9f9-4f4
secure os: (app: tipc-rust-test)
secure os: 0xffff8e07d3f04d60: 0xffff95a40151f834/0xffff00000009f834
secure os: 0xffff8e07d3f04da0: 0xffff95a40151fd34/0xffff00000009fd34
secure os: 0xffff8e07d3f04e00: 0xffff95a401488a18/0xffff000000008a18
secure os: 0xffff8e07d3f04e90: 0xffff95a401481804/0xffff000000001804
secure os: 0xffff8e07d3f04ff0: 0x00002808400acd38/0x0000000000017d38 rust_panic+0x4/0xc

With change:

secure os: Backtrace for thread: trusty_app_69_3c322c86-b9f9-4f4
secure os: (app: tipc-rust-test)
secure os: 0xffffceb434401d60: 0xffff0118395ac834/0xffff00000009f834
secure os: 0xffffceb434401da0: 0xffff0118395acd34/0xffff00000009fd34
secure os: 0xffffceb434401e00: 0xffff011839515a18/0xffff000000008a18
secure os: 0xffffceb434401e90: 0xffff01183950e804/0xffff000000001804
secure os: 0xffffceb434401ff0: 0x0000716f08acfff4/0x0000000000017ff4 rust_panic+0xc/0x14
secure os: 0x0000d2ee3c95d840: 0x0000716f08acff48/0x0000000000017f48 _RNvNtCshZYQMuAMKH1_3std9panicking20rust_panic_with_hook+0x2ac/0x34c
secure os: 0x0000d2ee3c95d8f0: 0x0000716f08acfb70/0x0000000000017b70 _RNCNvNtCshZYQMuAMKH1_3std9panicking19begin_panic_handler0B5_.llvm.322 <...>
secure os: 6645419645784658+0x6c/0x98
secure os: 0x0000d2ee3c95d960: 0x0000716f08acf310/0x0000000000017310 _RINvNtNtCshZYQMuAMKH1_3std10sys_common9backtrace26___rust_end_short_b <...>
secure os: acktraceNCNvNtB6_9panicking19begin_panic_handler0zEB6_.llvm.3226645419645784658+0x10/0x14
secure os: 0x0000d2ee3c95d970: 0x0000716f08acf908/0x0000000000017908 rust_begin_unwind+0x48/0x4c
secure os: 0x0000d2ee3c95d9a0: 0x0000716f08acaf70/0x0000000000012f70 _RNvNtCsacfZAXMdSAU_4core9panicking9panic_fmt+0x30/0x34
secure os: 0x0000d2ee3c95daf8: 0x0000716f08ad2410/0x000000000001a410 _RNvXs2_Csi0TH7fJACpx_4testNtB5_11TestServiceNtNtCs79LJHVJQhFn_4tipc7s <...>
secure os: ervice7Service10on_connect+0x1fc/0x7d8
secure os: 0x0000d2ee3c95dc40: 0x0000716f08ad3238/0x000000000001b238 _RNvCsi0TH7fJACpx_4test22test_main_static_abort+0x84c/0x117c
secure os: 0x0000d2ee3c95fe50: 0x0000716f08ad6cb8/0x000000000001ecb8 _RNCINvNtCshZYQMuAMKH1_3std2rt10lang_startuE0CsloUuf2z0ULp_4tipc+0x14/ <...>
secure os: 0x20
secure os: 0x0000d2ee3c95feb0: 0x0000716f08ace9b0/0x00000000000169b0 _RNvNtCshZYQMuAMKH1_3std2rt19lang_start_internal+0xdc/0x184
secure os: 0x0000d2ee3c95fee0: 0x0000716f08adb798/0x0000000000023798 main+0x40/0x4c
secure os: 0x0000d2ee3c95ff20: 0x0000716f08adc3cc/0x00000000000243cc libc_start_main_stage2+0x80/0xcc
secure os: 0x0000d2ee3c95ff40: 0x0000000000000000/0x0000000000000000

Bug: 300888071
Test: build.py
Change-Id: Ide5112ab719ecaa2af7beb0290d60aea2541c959
1 file changed