Issue 36002: configure --enable-optimizations with clang fails to detect llvm-profdata (original) (raw)

This is probably a automake bug.

When running CC=clang CXX=clang++ ./configure --enable-optimizations, configure tests for a non-existing -llvm-profdata binary:

checking for --enable-optimizations... yes checking for --with-lto... no checking for -llvm-profdata... no configure: error: llvm-profdata is required for a --enable-optimizations build but could not be found.

The generated configure script looks for "$target_alias-llvm-profdata", and $target_alias is an empty string.

This problem is not visible on Macs, where additional checks for "/usr/bin/xcrun -find llvm-profdata" locate the binary.

The work-around would be to specify a target when configuring.