Show these flags:
- `LLVM-CLANG` for mainline llvm/clang.
- `APPLE-CLANG` for Apple clang.
- `CLANG-CL` for clang-cl. (cmake only)
Also:
- GHA/linux: fix a job to build with clang, to match its descriptions.
Closes #18645
- name: 'openssl clang krb5 LTO'
install_packages: zlib1g-dev libkrb5-dev clang
install_steps: skiprun
+ CC: clang
generate: -DCURL_USE_OPENSSL=ON -DCURL_USE_GSSAPI=ON -DENABLE_DEBUG=ON -DCURL_LTO=ON
- name: 'openssl !ipv6 !--libcurl !--digest-auth'
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
string(APPEND _target_flags " GCC")
endif()
+if(CMAKE_C_COMPILER_ID MATCHES "Clang")
+ if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
+ string(APPEND _target_flags " APPLE-CLANG")
+ elseif(MSVC)
+ string(APPEND _target_flags " CLANG-CL")
+ else()
+ string(APPEND _target_flags " LLVM-CLANG")
+ endif()
+endif()
if(MINGW)
string(APPEND _target_flags " MINGW")
endif()
if test "x$compiler_id" = 'xGNU_C'; then
curl_pflags="${curl_pflags} GCC"
fi
+ if "$compiler_id" = "APPLECLANG"; then
+ curl_pflags="${curl_pflags} APPLE-CLANG"
+ elif test "$compiler_id" = "CLANG"; then
+ curl_pflags="${curl_pflags} LLVM-CLANG"
+ fi
case $host_os in
mingw*) curl_pflags="${curl_pflags} MINGW";;
esac