1========================== 2Layering Over Another libc 3========================== 4 5When meaningful and practically possible on a platform, llvm-libc will be 6developed in a fashion that it will be possible to layer it over the system 7libc. This does not mean that one can mix llvm-libc with the system-libc. Also, 8it does not mean that layering is the only way to use llvm-libc. What it 9means is that, llvm-libc can optionally be packaged in a way that it can 10delegate parts of the functionality to the system-libc. The delegation happens 11internal to llvm-libc and is invisible to the users. From the user's point of 12view, they only call into llvm-libc. 13 14There are a few problems one needs to be mindful of when implementing such a 15delegation scheme in llvm-libc. Examples of such problems are: 16 171. One cannot mix data structures from llvm-libc with those from the 18system-libc. A translation from one set of data structures to the other should 19happen internal to llvm-libc. 202. The delegation mechanism has to be implemented over a related set of 21functions. For example, one cannot delegate just the `fopen` function to the 22system-libc. One will have to delegate all `FILE` related functions to the 23system-libc. 24