Skip to content

Separation of codegen/runtime hides LLVM passes on Windows #42609

Closed
@maleadt

Description

@maleadt

The symbol LLVMExtraAddPropagateJuliaAddrspaces is exported to make one of our LLVM passes usable from Julia:

extern "C" JL_DLLEXPORT void LLVMExtraAddPropagateJuliaAddrspaces(LLVMPassManagerRef PM)
{
unwrap(PM)->add(createPropagateJuliaAddrspaces());
}

Since #41936, this symbol is missing from the Windows binaries:

Tim@aries MINGW64 ~/Downloads
$ JULIA_VERSION=nightly jl -e '@show VERSION; ccall(:LLVMExtraAddPropagateJuliaAddrspaces,Cvoid,(Ptr{Cvoid},), C_NULL)'
VERSION = v"1.8.0-DEV.706"
ERROR: could not load symbol "LLVMExtraAddPropagateJuliaAddrspaces":
The specified procedure could not be found.
Stacktrace:
 [1] top-level scope
   @ .\none:1

Works fine on 1.7 (the segfault is expected; I'm misusing the API here):

Tim@aries MINGW64 ~/Downloads
$ JULIA_VERSION=1.7 jl -e '@show VERSION; ccall(:LLVMExtraAddPropagateJuliaAddrspaces,Cvoid,(Ptr{Cvoid},), C_NULL)'
VERSION = v"1.7.0-rc1"

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x17d5d6b -- LLVMExtraAddPropagateJuliaAddrspaces at /cygdrive/c/buildbot/worker/package_win64/build/src\llvm-propagate-addrspaces.cpp:311

Works fine on Linux:

tim@taurus ~$ JULIA_VERSION=nightly jl -e '@show VERSION; ccall(:LLVMExtraAddPropagateJuliaAddrspaces,Cvoid,(Ptr{Cvoid},), C_NULL)'                                                                                                        
VERSION = v"1.8.0-DEV.706"

signal (11): Segmentation fault
in expression starting at none:1
LLVMExtraAddPropagateJuliaAddrspaces at /buildworker/worker/package_linux64/build/src/llvm-propagate-addrspaces.cpp:311

This breaks GPUCompiler.jl.

Metadata

Metadata

Assignees

Labels

compiler:codegenGeneration of LLVM IR and native coderegressionRegression in behavior compared to a previous version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions