fails to build with LLVM 20.1.3

If you're requesting help with building or using llvm-sys, please include this information in addition to any other items (like compiler error messages) that you think will be helpful:

  • version of llvm-sys you're using (either crate version or commit hash)
  • OS you're compiling on, including version if possible (example: Ubuntu 20.04 or macOS 13)
  • what version of LLVM you're building against and where you got it from (from a package provided by your OS, built it yourself, using llvmenv..)

llvm-sys 201.0.0, ubuntu-latest (on GHA)

LLVM from: https://github.com/llvm/llvm-project/releases/tag/llvmorg-20.1.3 (LLVM-20.1.3-Linux-X64.tar.xz )

Failure logs
error: failed to run custom build command for `llvm-sys v201.0.0`
Caused by:
  process didn't exit successfully: `/home/runner/work/nextest-issue-2295/nextest-issue-2295/target/debug/build/llvm-sys-c1ae10959d913a26/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=LLVM_SYS_201_PREFIX
  cargo:rerun-if-changed=/home/runner/work/nextest-issue-2295/nextest-issue-2295/LLVM-20.1.3-Linux-X64
  cargo:rerun-if-env-changed=LLVM_SYS_201_IGNORE_BLOCKLIST
  cargo:rerun-if-env-changed=LLVM_SYS_201_STRICT_VERSIONING
  cargo:rerun-if-env-changed=LLVM_SYS_201_NO_CLEAN_CFLAGS
  cargo:rerun-if-env-changed=LLVM_SYS_201_USE_DEBUG_MSVCRT
  cargo:rerun-if-env-changed=LLVM_SYS_201_FFI_WORKAROUND
  OUT_DIR = Some(/home/runner/work/nextest-issue-2295/nextest-issue-2295/target/debug/build/llvm-sys-1450090a71953272/out)
  OPT_LEVEL = Some(0)
  TARGET = Some(x86_64-unknown-linux-gnu)
  HOST = Some(x86_64-unknown-linux-gnu)
  cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
  CC_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
  CC_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  RUSTC_WRAPPER = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some(true)
  CARGO_CFG_TARGET_FEATURE = Some(fxsr,sse,sse2,x87)
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = Some(-I/home/runner/work/nextest-issue-2295/nextest-issue-2295/LLVM-20.1.3-Linux-X64/include  -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS )
  cargo:rerun-if-env-changed=CC_SHELL_ESCAPED_FLAGS
  CC_SHELL_ESCAPED_FLAGS = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
  CFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
  CFLAGS_x86_64-unknown-linux-gnu = None
  CARGO_ENCODED_RUSTFLAGS = Some()
  cargo:rerun-if-env-changed=AR_x86_64-unknown-linux-gnu
  AR_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=AR_x86_64_unknown_linux_gnu
  AR_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_AR
  HOST_AR = None
  cargo:rerun-if-env-changed=AR
  AR = None
  cargo:rerun-if-env-changed=ARFLAGS
  ARFLAGS = None
  cargo:rerun-if-env-changed=HOST_ARFLAGS
  HOST_ARFLAGS = None
  cargo:rerun-if-env-changed=ARFLAGS_x86_64_unknown_linux_gnu
  ARFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=ARFLAGS_x86_64-unknown-linux-gnu
  ARFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rustc-link-lib=static=targetwrappers
  cargo:rustc-link-search=native=/home/runner/work/nextest-issue-2295/nextest-issue-2295/target/debug/build/llvm-sys-1450090a71953272/out
  cargo:config_path=/home/runner/work/nextest-issue-2295/nextest-issue-2295/LLVM-20.1.3-Linux-X64/bin/llvm-config
  cargo:libdir=/home/runner/work/nextest-issue-2295/nextest-issue-2295/LLVM-20.1.3-Linux-X64/lib
  cargo:rustc-link-search=native=/home/runner/work/nextest-issue-2295/nextest-issue-2295/LLVM-20.1.3-Linux-X64/lib
  cargo:rustc-link-lib=static=LLVMWindowsManifest
  cargo:rustc-link-lib=static=LLVMXRay
  cargo:rustc-link-lib=static=LLVMLibDriver
  cargo:rustc-link-lib=static=LLVMDlltoolDriver
  cargo:rustc-link-lib=static=LLVMTelemetry
  cargo:rustc-link-lib=static=LLVMTextAPIBinaryReader
  cargo:rustc-link-lib=static=LLVMCoverage
  cargo:rustc-link-lib=static=LLVMLineEditor
  cargo:rustc-link-lib=static=LLVMXCoreDisassembler
  cargo:rustc-link-lib=static=LLVMXCoreCodeGen
  cargo:rustc-link-lib=static=LLVMXCoreDesc
  cargo:rustc-link-lib=static=LLVMXCoreInfo
  cargo:rustc-link-lib=static=LLVMX86TargetMCA
  cargo:rustc-link-lib=static=LLVMX86Disassembler
  cargo:rustc-link-lib=static=LLVMX86AsmParser
  cargo:rustc-link-lib=static=LLVMX86CodeGen
  cargo:rustc-link-lib=static=LLVMX86Desc
  cargo:rustc-link-lib=static=LLVMX86Info
  cargo:rustc-link-lib=static=LLVMWebAssemblyDisassembler
  cargo:rustc-link-lib=static=LLVMWebAssemblyAsmParser
  cargo:rustc-link-lib=static=LLVMWebAssemblyCodeGen
  cargo:rustc-link-lib=static=LLVMWebAssemblyUtils
  cargo:rustc-link-lib=static=LLVMWebAssemblyDesc
  cargo:rustc-link-lib=static=LLVMWebAssemblyInfo
  cargo:rustc-link-lib=static=LLVMVEDisassembler
  cargo:rustc-link-lib=static=LLVMVEAsmParser
  cargo:rustc-link-lib=static=LLVMVECodeGen
  cargo:rustc-link-lib=static=LLVMVEDesc
  cargo:rustc-link-lib=static=LLVMVEInfo
  cargo:rustc-link-lib=static=LLVMSystemZDisassembler
  cargo:rustc-link-lib=static=LLVMSystemZAsmParser
  cargo:rustc-link-lib=static=LLVMSystemZCodeGen
  cargo:rustc-link-lib=static=LLVMSystemZDesc
  cargo:rustc-link-lib=static=LLVMSystemZInfo
  cargo:rustc-link-lib=static=LLVMSPIRVCodeGen
  cargo:rustc-link-lib=static=LLVMSPIRVDesc
  cargo:rustc-link-lib=static=LLVMSPIRVInfo
  cargo:rustc-link-lib=static=LLVMSPIRVAnalysis
  cargo:rustc-link-lib=static=LLVMSparcDisassembler
  cargo:rustc-link-lib=static=LLVMSparcAsmParser
  cargo:rustc-link-lib=static=LLVMSparcCodeGen
  cargo:rustc-link-lib=static=LLVMSparcDesc
  cargo:rustc-link-lib=static=LLVMSparcInfo
  cargo:rustc-link-lib=static=LLVMRISCVTargetMCA
  cargo:rustc-link-lib=static=LLVMRISCVDisassembler
  cargo:rustc-link-lib=static=LLVMRISCVAsmParser
  cargo:rustc-link-lib=static=LLVMRISCVCodeGen
  cargo:rustc-link-lib=static=LLVMRISCVDesc
  cargo:rustc-link-lib=static=LLVMRISCVInfo
  cargo:rustc-link-lib=static=LLVMPowerPCDisassembler
  cargo:rustc-link-lib=static=LLVMPowerPCAsmParser
  cargo:rustc-link-lib=static=LLVMPowerPCCodeGen
  cargo:rustc-link-lib=static=LLVMPowerPCDesc
  cargo:rustc-link-lib=static=LLVMPowerPCInfo
  cargo:rustc-link-lib=static=LLVMNVPTXCodeGen
  cargo:rustc-link-lib=static=LLVMNVPTXDesc
  cargo:rustc-link-lib=static=LLVMNVPTXInfo
  cargo:rustc-link-lib=static=LLVMMSP430Disassembler
  cargo:rustc-link-lib=static=LLVMMSP430AsmParser
  cargo:rustc-link-lib=static=LLVMMSP430CodeGen
  cargo:rustc-link-lib=static=LLVMMSP430Desc
  cargo:rustc-link-lib=static=LLVMMSP430Info
  cargo:rustc-link-lib=static=LLVMMipsDisassembler
  cargo:rustc-link-lib=static=LLVMMipsAsmParser
  cargo:rustc-link-lib=static=LLVMMipsCodeGen
  cargo:rustc-link-lib=static=LLVMMipsDesc
  cargo:rustc-link-lib=static=LLVMMipsInfo
  cargo:rustc-link-lib=static=LLVMLoongArchDisassembler
  cargo:rustc-link-lib=static=LLVMLoongArchAsmParser
  cargo:rustc-link-lib=static=LLVMLoongArchCodeGen
  cargo:rustc-link-lib=static=LLVMLoongArchDesc
  cargo:rustc-link-lib=static=LLVMLoongArchInfo
  cargo:rustc-link-lib=static=LLVMLanaiDisassembler
  cargo:rustc-link-lib=static=LLVMLanaiCodeGen
  cargo:rustc-link-lib=static=LLVMLanaiAsmParser
  cargo:rustc-link-lib=static=LLVMLanaiDesc
  cargo:rustc-link-lib=static=LLVMLanaiInfo
  cargo:rustc-link-lib=static=LLVMHexagonDisassembler
  cargo:rustc-link-lib=static=LLVMHexagonCodeGen
  cargo:rustc-link-lib=static=LLVMHexagonAsmParser
  cargo:rustc-link-lib=static=LLVMHexagonDesc
  cargo:rustc-link-lib=static=LLVMHexagonInfo
  cargo:rustc-link-lib=static=LLVMBPFDisassembler
  cargo:rustc-link-lib=static=LLVMBPFAsmParser
  cargo:rustc-link-lib=static=LLVMBPFCodeGen
  cargo:rustc-link-lib=static=LLVMBPFDesc
  cargo:rustc-link-lib=static=LLVMBPFInfo
  cargo:rustc-link-lib=static=LLVMAVRDisassembler
  cargo:rustc-link-lib=static=LLVMAVRAsmParser
  cargo:rustc-link-lib=static=LLVMAVRCodeGen
  cargo:rustc-link-lib=static=LLVMAVRDesc
  cargo:rustc-link-lib=static=LLVMAVRInfo
  cargo:rustc-link-lib=static=LLVMARMDisassembler
  cargo:rustc-link-lib=static=LLVMARMAsmParser
  cargo:rustc-link-lib=static=LLVMARMCodeGen
  cargo:rustc-link-lib=static=LLVMARMDesc
  cargo:rustc-link-lib=static=LLVMARMUtils
  cargo:rustc-link-lib=static=LLVMARMInfo
  cargo:rustc-link-lib=static=LLVMAMDGPUTargetMCA
  cargo:rustc-link-lib=static=LLVMAMDGPUDisassembler
  cargo:rustc-link-lib=static=LLVMAMDGPUAsmParser
  cargo:rustc-link-lib=static=LLVMAMDGPUCodeGen
  cargo:rustc-link-lib=static=LLVMAMDGPUDesc
  cargo:rustc-link-lib=static=LLVMAMDGPUUtils
  cargo:rustc-link-lib=static=LLVMAMDGPUInfo
  cargo:rustc-link-lib=static=LLVMAArch64Disassembler
  cargo:rustc-link-lib=static=LLVMAArch64AsmParser
  cargo:rustc-link-lib=static=LLVMAArch64CodeGen
  cargo:rustc-link-lib=static=LLVMAArch64Desc
  cargo:rustc-link-lib=static=LLVMAArch64Utils
  cargo:rustc-link-lib=static=LLVMAArch64Info
  cargo:rustc-link-lib=static=LLVMOrcDebugging
  cargo:rustc-link-lib=static=LLVMOrcJIT
  cargo:rustc-link-lib=static=LLVMWindowsDriver
  cargo:rustc-link-lib=static=LLVMMCJIT
  cargo:rustc-link-lib=static=LLVMJITLink
  cargo:rustc-link-lib=static=LLVMInterpreter
  cargo:rustc-link-lib=static=LLVMExecutionEngine
  cargo:rustc-link-lib=static=LLVMRuntimeDyld
  cargo:rustc-link-lib=static=LLVMOrcTargetProcess
  cargo:rustc-link-lib=static=LLVMOrcShared
  cargo:rustc-link-lib=static=LLVMDWP
  cargo:rustc-link-lib=static=LLVMDebugInfoLogicalView
  cargo:rustc-link-lib=static=LLVMDebugInfoGSYM
  cargo:rustc-link-lib=static=LLVMOption
  cargo:rustc-link-lib=static=LLVMObjectYAML
  cargo:rustc-link-lib=static=LLVMObjCopy
  cargo:rustc-link-lib=static=LLVMMCA
  cargo:rustc-link-lib=static=LLVMMCDisassembler
  cargo:rustc-link-lib=static=LLVMLTO
  cargo:rustc-link-lib=static=LLVMFrontendOpenACC
  cargo:rustc-link-lib=static=LLVMFrontendHLSL
  cargo:rustc-link-lib=static=LLVMFrontendDriver
  cargo:rustc-link-lib=static=LLVMExtensions
  cargo:rustc-link-lib=static=Polly
  cargo:rustc-link-lib=static=PollyISL
  cargo:rustc-link-lib=static=LLVMPasses
  cargo:rustc-link-lib=static=LLVMHipStdPar
  cargo:rustc-link-lib=static=LLVMCoroutines
  cargo:rustc-link-lib=static=LLVMCFGuard
  cargo:rustc-link-lib=static=LLVMipo
  cargo:rustc-link-lib=static=LLVMInstrumentation
  cargo:rustc-link-lib=static=LLVMVectorize
  cargo:rustc-link-lib=static=LLVMSandboxIR
  cargo:rustc-link-lib=static=LLVMLinker
  cargo:rustc-link-lib=static=LLVMFrontendOpenMP
  cargo:rustc-link-lib=static=LLVMFrontendAtomic
  cargo:rustc-link-lib=static=LLVMFrontendOffloading
  cargo:rustc-link-lib=static=LLVMDWARFLinkerParallel
  cargo:rustc-link-lib=static=LLVMDWARFLinkerClassic
  cargo:rustc-link-lib=static=LLVMDWARFLinker
  cargo:rustc-link-lib=static=LLVMGlobalISel
  cargo:rustc-link-lib=static=LLVMMIRParser
  cargo:rustc-link-lib=static=LLVMAsmPrinter
  cargo:rustc-link-lib=static=LLVMSelectionDAG
  cargo:rustc-link-lib=static=LLVMCodeGen
  cargo:rustc-link-lib=static=LLVMTarget
  cargo:rustc-link-lib=static=LLVMObjCARCOpts
  cargo:rustc-link-lib=static=LLVMCodeGenTypes
  cargo:rustc-link-lib=static=LLVMCGData
  cargo:rustc-link-lib=static=LLVMIRPrinter
  cargo:rustc-link-lib=static=LLVMInterfaceStub
  cargo:rustc-link-lib=static=LLVMFileCheck
  cargo:rustc-link-lib=static=LLVMFuzzMutate
  cargo:rustc-link-lib=static=LLVMScalarOpts
  cargo:rustc-link-lib=static=LLVMInstCombine
  cargo:rustc-link-lib=static=LLVMAggressiveInstCombine
  cargo:rustc-link-lib=static=LLVMTransformUtils
  cargo:rustc-link-lib=static=LLVMBitWriter
  cargo:rustc-link-lib=static=LLVMAnalysis
  cargo:rustc-link-lib=static=LLVMProfileData
  cargo:rustc-link-lib=static=LLVMSymbolize
  cargo:rustc-link-lib=static=LLVMDebugInfoBTF
  cargo:rustc-link-lib=static=LLVMDebugInfoPDB
  cargo:rustc-link-lib=static=LLVMDebugInfoMSF
  cargo:rustc-link-lib=static=LLVMDebugInfoCodeView
  cargo:rustc-link-lib=static=LLVMDebugInfoDWARF
  cargo:rustc-link-lib=static=LLVMObject
  cargo:rustc-link-lib=static=LLVMTextAPI
  cargo:rustc-link-lib=static=LLVMMCParser
  cargo:rustc-link-lib=static=LLVMIRReader
  cargo:rustc-link-lib=static=LLVMAsmParser
  cargo:rustc-link-lib=static=LLVMMC
  cargo:rustc-link-lib=static=LLVMBitReader
  cargo:rustc-link-lib=static=LLVMFuzzerCLI
  cargo:rustc-link-lib=static=LLVMCore
  cargo:rustc-link-lib=static=LLVMRemarks
  cargo:rustc-link-lib=static=LLVMBitstreamReader
  cargo:rustc-link-lib=static=LLVMBinaryFormat
  cargo:rustc-link-lib=static=LLVMTargetParser
  cargo:rustc-link-lib=static=LLVMTableGen
  cargo:rustc-link-lib=static=LLVMSupport
  cargo:rustc-link-lib=static=LLVMDemangle
  cargo:rustc-link-search=/usr/lib/x86_64-linux-gnu
  --- stderr
  thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/llvm-sys-201.0.0/build.rs:352:26:
  Shared library should be a .so file
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: Process completed with exit code 101.

extra: llvm-config --system-libs --link-static outputs

-lrt -ldl -lm -lz /usr/lib/x86_64-linux-gnu/libzstd.a -lxml2

Which seems to mess with https://gitlab.com/taricorp/llvm-sys.rs/-/blob/main/build.rs#L351