CPack strip doesn't work with llvm-strip on macOS

I’m enabling CPACK_STRIP_FILES on macOS and I have manually built llvm toolchain in the path (same is reproducible with official LLVM build - and CPack finds llvm-strip instead of strip (which can be picked up either at /usr/bin/strip or in the SDK). As a result, I have the following message when building the a package:
/Users/dybaboki/tmp/clang+llvm-15.0.7-x86_64-apple-darwin21.0/bin/llvm-strip: error: unknown argument '-u'

Note that the build is “successful”, i.e. CPack ignores this error.

My questions are:

  1. Is this behavior that llvm-strip is used rather than system/SDK strip expected / intended?
  2. Is there a way to avoid llvm-strip and force strip to be used?

And I think it’s worth fixing CPack to treat llvm-strip differently, i.e. take into account that -u is not supported, as well as fail packaging if strip tool (whatever tool is used) fails, rather than ignore it.

Seems worth a feature request to me.

I’ve created an issue:

Also would be good to know what workarounds may be.