cosmopolitan/libc/str
Justine Tunney e7b586e7f8
Add preliminary support for cosmocc -mclang
C++ code compiles very slowly with cosmocc, possibly because we're using
LLVM LIBCXX with GCC, and LLVM doesn't work as hard to make GCC go fast.
Therefore, it should be possible, to ask cosmocc to favor Clang over GCC
under the hood. On llamafile, my intention's to use this to make certain
files, e.g. llama.cpp/common.cpp, go from taking 17 seconds to 5 seconds

This new -mclang flag isn't ready for production yet since there's still
the question of how to get Clang to generate SJLJ exception code. If you
use this, then it's recommended you also pass -fno-exceptions.

The tradeoff is we're adding a 121mb binary to the cosmocc distribution.
There are no plans as of yet to fully migrate to Clang since GCC is very
good and has always treated us well.
2024-08-26 12:33:35 -07:00
..
a64l.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
bcmp.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
blake2.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
blake2.h Reduce header complexity 2023-11-28 14:39:42 -08:00
blocks.txt Fold LIBC_UNICODE into LIBC_STR 2022-08-13 08:42:32 -07:00
BUILD.mk Add preliminary support for cosmocc -mclang 2024-08-26 12:33:35 -07:00
chomp.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
chomp16.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
compareslices.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
compareslicescase.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
crc32c.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
djbsort.c Make improvements 2024-02-12 10:23:00 -08:00
dosdatetimetounix.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
eastasianwidth.txt Fold LIBC_UNICODE into LIBC_STR 2022-08-13 08:42:32 -07:00
endswith.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
endswith16.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
getcachesize.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
getx86processormodel.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
getzipcdircomment.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
getzipcdircommentsize.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
getzipcdiroffset.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
getzipcdirrecords.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
getzipcdirsize.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
getzipcfilecompressedsize.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
getzipcfilemode.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
getzipcfileoffset.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
getzipcfiletimestamps.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
getzipcfileuncompressedsize.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
getzipeocd.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
getziplfilecompressedsize.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
getziplfileuncompressedsize.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
hexpcpy.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
highwayhash64.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
highwayhash64.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
intsort.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
isalnum.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
isalpha.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
isascii.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
isblank.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
iscntrl.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
isdigit.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
isgraph.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
islower.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
iso8601.c Implement proper time zone support 2024-05-04 23:06:37 -07:00
iso8601us.c Implement proper time zone support 2024-05-04 23:06:37 -07:00
isprint.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
ispunct.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
isspace.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
istext.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
isupper.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
isutf8.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
iswalnum.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
iswalpha.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
iswblank.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
iswcntrl.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
iswctype.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
iswdigit.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
iswgraph.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
iswlower.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
iswprint.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
iswpunct.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
iswseparator.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
iswspace.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
iswupper.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
iswxdigit.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
isxdigit.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
iszipeocd32.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
iszipeocd64.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
joinpaths.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
khextoint.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
kmonthyearday.c Implement proper time zone support 2024-05-04 23:06:37 -07:00
kx86processormodels.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
l64a.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
langinfo.h Update Musl Libc code 2024-07-30 22:51:29 -07:00
locale.c Update Musl Libc code 2024-07-30 22:51:29 -07:00
locale.h Update Musl Libc code 2024-07-30 22:51:29 -07:00
locale.internal.h Update Musl Libc code 2024-07-30 22:51:29 -07:00
localeconv.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
longsort.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
lz4check.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
lz4cpy.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
lz4decode.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
lz4len.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
memcasecmp.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
memccpy.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
memchr16.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
memfrob.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
memmem.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
memrchr16.c Make improvements 2024-02-12 10:23:00 -08:00
memset16.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
nltypes.h Add OpenMP support 2024-01-28 22:39:02 -08:00
rawmemchr.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
rawmemchr16.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
rldecode2.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
slice.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
smoothsort.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
SpecialCasing.txt Fold LIBC_UNICODE into LIBC_STR 2022-08-13 08:42:32 -07:00
startswith.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
startswith16.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
startswithi.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
stpncpy.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
str.h Expose wmempcpy() to _GNU_SOURCE 2024-08-17 08:13:22 -07:00
strcasecmp.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
strcasecmp16.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
strcasestr.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
strcat.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strcat16.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strchr16.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
strchrnul16.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
strcmp16.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
strcoll.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strcpy16.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strcspn.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strcspn16.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strlcat.c Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
strlcpy.c Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
strlen16.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
strncasecmp.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
strncasecmp16.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
strncat.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strncat16.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
strncmp16.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
strncpy.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
strnlen16.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
strnlen_s.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
strnwidth.c Get rid of some legacy code 2024-08-24 17:53:30 -07:00
strnwidth16.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
strpbrk.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strpbrk16.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strrchr16.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strsep.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strspn.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strspn16.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strstr.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
strstr16.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
strtok.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strtok_r.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strtol.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
strtoul.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
strverscmp.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
strwidth.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strwidth.h Reduce header complexity 2023-11-28 14:39:42 -08:00
strwidth16.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
strxfrm.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
tab.h Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
thompike.h Rename _bsr/_bsf to bsr/bsf 2024-03-04 17:33:26 -08:00
timespectowindowstime.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
timevaltowindowstime.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
timingsafe_bcmp.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
timingsafe_memcmp.c Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
toascii.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
todd.c Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
tolower.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
toupper.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
towctrans.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
towlower.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
towupper.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
tpdecodecb.internal.h Run clang-format (#1197) 2024-06-01 16:30:43 -04:00
tprecode8to16.c Get rid of some legacy code 2024-08-24 17:53:30 -07:00
tprecode16to8.c Get rid of some legacy code 2024-08-24 17:53:30 -07:00
unicode-properties.txt Fold LIBC_UNICODE into LIBC_STR 2022-08-13 08:42:32 -07:00
unicode.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
unicodedata.txt Fold LIBC_UNICODE into LIBC_STR 2022-08-13 08:42:32 -07:00
update.sh Stop using .com extension in monorepo 2024-03-03 03:12:19 -08:00
utf16.h Rerun clang-format on the repo (#1217) 2024-06-15 16:34:48 -04:00
wchomp.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wcscasecmp.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
wcscat.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wcschr.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
wcschrnul.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
wcscmp.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
wcscpy.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wcscspn.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wcsendswith.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
wcslen.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
wcsncasecmp.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
wcsncat.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
wcsncmp.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
wcsncpy.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wcsnlen.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wcsnlen_s.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
wcsnwidth.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wcspbrk.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wcsrchr.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wcsspn.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wcsstartswith.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
wcsstr.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
wcstok.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wcswidth.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wcsxfrm.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wctrans.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
wctype.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
wcwidth.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
wcwidth_osx.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
wcwidth_osx.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
windowsdurationtotimespec.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
windowsdurationtotimeval.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
windowstimetotimespec.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
windowstimetotimeval.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wmemchr.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wmemcmp.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wmemcpy.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
wmemmove.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
wmempcpy.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
wmemrchr.c Make improvements 2024-02-12 10:23:00 -08:00
wmemset.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00