Where is STRIP set for clang?
erik.joelsson at oracle.com
erik.joelsson at oracle.com
Tue Jul 26 17:04:51 UTC 2022
I'm not very familiar with this, but it looks like clang/llvm does come
with its own strip utility, which would make this comment wrong.
On Linux, it's likely common to find the gnu binutils strip on the path
even when trying to use clang to compile OpenJDK. Ideally we should
setup STRIPFLAGS based on probing the strip executable that was found.
/Erik
On 7/24/22 1:07 AM, Julian Waters wrote:
> Found something interesting in FLAGS_SETUP_STRIPFLAGS recently:
> ## Setup strip.
> # FIXME: should this really be per platform, or should it be per
> toolchain type?
> # strip is not provided by clang; so guessing platform makes most sense.
>
> STRIPFLAGS is set to -S after this for clang (or more accurately, when
> the OS being compiled for is MacOS), but STRIP for clang (Likely using
> the clang driver itself) doesn't seem to be set anywhere within make.
> The only place I can find it being set is in
> toolchain.m4, UTIL_LOOKUP_TOOLCHAIN_PROGS(STRIP, strip), when the OS
> that's being compiled for != windows. But if the comment that strip
> isn't available for clang is still correct and up to date, this
> doesn't seem right, considering Linux allows for compiling the JDK
> with clang as well, while -S is only set with MacOS, and the !=
> windows check would also not work properly since it would still check
> for the regular strip utility even if the compiler was clang.
>
> best regards,
> Julian
More information about the build-dev
mailing list