Page MenuHomePhabricator

Figure out where our stdatomic.h comes from and get rid of inc/system hack
Open, Needs TriagePublic

Description

prebuilts/linux-x64/clang/lib64/clang/8.0.4/include/stdatomic.h seems to be from FreeBSD rather than upstream Clang for some reason. Possibly it got there via Bionic. It depends on the internal libc header sys/cdefs.h, which it shouldn't, and the upstream Clang version of stdatomic.h does not. We should consider moving to upstream Clang rather than the Android version, or using some other version of stdatomic.h.

ascull@ said:
We don't want to be maintaining out own build of clang. The toolchain team take care of validating the selected revisions and taking the appropriate patches so the artifacts are good. We only need to pull in their newest release to update rather than having to go through all the other details.

What we're looking for is an implementation of the the C standard library's freestanding (not hosted) headers. We can either:

  • provide these ourselves
  • check with the toolchain team if we can have better support for non-hosted builds

dbrazdil@ said:
Nothing done on our side for this yet. Arm might want to look into this on their end. They might want to replace the toolchain completely.

(Migrated from b/128523274.)

Event Timeline