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 - https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.7/clang+llvm-15.0.7-x86_64-apple-darwin21.0.tar.xz) 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:
- Is this behavior that
llvm-strip
is used rather than system/SDKstrip
expected / intended? - Is there a way to avoid
llvm-strip
and forcestrip
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.