jyknight wrote:

The intent of this standards change is that everyone should be able to depend 
on library functions from string.h, no matter how minimal or bare-metal their 
environment.

The requirement is now:
- <float.h>, <iso646.h>, <limits.h>, <stdalign.h>, <stdarg.h>, <stdbit.h>, 
<stdbool.h>, <stddef.h>, <stdint.h>, and <stdnoreturn.h>. 
- <string.h>, except strcoll, strdup, strerror, strndup, strtok, strxfrm
- memalignment from <stdlib.h>

Clang provides most of the required functionality already, other than stdbit.h, 
string.h, and stdlib.h. (assuming the freestanding versions the other headers 
are compliant, which I haven't verified).

The standard doesn't specify compiler command-line-options, and -ffreestanding 
has an existing meaning which doesn't involve pulling in library code, so 
possibly we shouldn't modify that flag's behavior.

But, what I would like is that we _somehow_ make it trivial for users to get an 
implementation of the required functionality without requiring an 
externally-provided libc. Some way for users to trivially build and link 
against implementations of those functions for their minimal target, without 
depending on anything else.

https://github.com/llvm/llvm-project/pull/132232
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to