+2
−2
+2
−2
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Turning on code coverage directly with cflags and ldflags is not supported, it generally takes more work from the build system to provide the right runtime. It happens to work for glibc, where clang can guess the right runtime itself, but when building against musl clang picks the wrong runtime causing link errors: ld.lld: error: undefined symbol: __strdup >>> referenced by InstrProfilingFile.c >>> InstrProfilingFile.c.o:(parseAndSetFilename) in archive /usr/local/google/home/ccross/ssd/aosp/prebuilts/clang/host/linux-x86/clang-r450784e/lib64/clang/14.0.7/lib/linux/libclang_rt.profile-x86_64.a Move the flags to only be used with glibc. Also include sys/cdefs.h for __BEGIN_DECLS and __END_DECLS. Bug: 190084016 Test: m USE_HOST_MUSL=true Change-Id: I1eef4aee5c7b691c0638cc1b00ce4b4661397974