JuliaInterop / Cxx.jl

The Julia C++ Interface
Other
757 stars 108 forks source link

Make globals external again #407

Closed jonathanvdc closed 4 years ago

jonathanvdc commented 5 years ago

Hello! Persuant to @vchuravy's suggestion in Julia PR #31272, I'd like to restore some commented-out code that makes all globals external. My proposed changes in the Julia PR tweak llvmcall to no longer silently discard non-external linkage for globals. However, as it turns out, Cxx.jl seems to implicitly rely on llvmcall discarding non-external linkage. Hence this PR.

I used Pkg.test() to run Cxx.jl's tests. With my proposed changes, Cxx.jl's tests all pass when run on my machine using the modified version of Julia from my aforementioned PR. Cxx.jl's tests also pass when run using Julia compiled from the master branch (hopefully the CI builds will confirm that). Is there anything else I should do to test if Cxx.jl still works?

jonathanvdc commented 5 years ago

Hmmm. The CI builds are failing but I'm not sure if that has anything to do with the changes in this PR. The root causes of the failing CI builds seem to be that

  1. on Linux, wget https://s3.amazonaws.com/julia-cxx/llvm-linux-6.0.1.tgz fails; and
  2. on MacOS, mkdir -p $TRAVIS_BUILD_DIR/../Cxx-cache && cp -R $TRAVIS_BUILD_DIR $TRAVIS_BUILD_DIR/../Cxx-cache fails.
oschulz commented 5 years ago

Are the still CI problems with this? Would be so great to get this merged so we can play with Cxx on Julia v1.3. :-)

Gnimuc commented 5 years ago

That CI failure doesn't matter. We need to patch this on the CxxBuilder side because it's not feasible to do a source build on Travis.

oschulz commented 5 years ago

Ah, thanks!