JuliaInterop / Cxx.jl

The Julia C++ Interface
Other
760 stars 107 forks source link

Is it possible to specify that Cxx.jl use a particular version of clang++ or g++? #377

Open philtomson opened 6 years ago

philtomson commented 6 years ago

I've got some C++17 code that I have to compile with clang++-5.0 or g++-7 as opposed to the system C++ compiler (which defaults to clang++-4.0). Is there any way to tell Cxx.jl to use a particular compiler?

ihnorton commented 6 years ago

You can set LLVM_VER when building, though note that the current patch matrix here looks like it only goes to LLVM 3.8 (Julia is currently at 3.9, but bumping to 6.0 is in progress).

See https://github.com/Keno/Cxx.jl/blob/master/deps/BuildBootstrap.Makefile#L4-L11

Note that Cxx uses its own clang, loaded as a shared library.