[rust/coverage] Pass -z,nostart-stop-gc to the linker
Bug: http://b/199203503 Upstream LLVM change 6d2d3bd0a6 made -z,start-stop-gc the default. It drops metadata sections like __llvm_prf_data unless they are marked SHF_GNU_RETAIN. https://reviews.llvm.org/D97448 marks generated sections, including __llvm_prf_data as SHF_GNU_RETAIN. However this change is not in the Rust toolchain. Since we link Rust libs with new lld, we should use nostart-stop-gc until the Rust toolchain updates past D97448. Test: m unicode-xid_device_test_src_lib and verify that they have the __llvm_prf_data section. Change-Id: I55eb3622dae9bd789fbacfe708600316102c365f
Loading
Please register or sign in to comment