Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c0949495 authored by Colin Cross's avatar Colin Cross
Browse files

Fix musl build for bluetooth

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
parent b3106508
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment