tools/nolibc/string: do not use __builtin_strlen() at -O0
authorWilly Tarreau <w@1wt.eu>
Wed, 23 Mar 2022 07:18:06 +0000 (08:18 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 21 Apr 2022 00:05:46 +0000 (17:05 -0700)
commit96980b833a21c6dc29d0dfdc8f211fb8a10256a7
tree7479441067048a940a0e8d52f97c6b987b9c0198
parent0b37dff10bc05576f9594a10e8ef9c718dab931f
tools/nolibc/string: do not use __builtin_strlen() at -O0

clang wants to use strlen() for __builtin_strlen() at -O0. We don't
really care about -O0 but it at least ought to build, so let's make
sure we don't choke on this, by dropping the optimizationn for
constant strings in this case.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/string.h