"fconstexpr-steps" compiler flag

So I have a single cuda file with a c++ dependency (e.g. #include <ecc/curves/grumpkin/grumpkin.hpp>). Nvcc is compiling the cuda file with a dependency that relies on the compiler flag “fconstexpr-steps=100000000” being set. This flag is recognized by CCX, but not by NVCC (so the file won’t compile).

To get around this, I use the “string(APPEND CMAKE_CUDA_FLAGS " -Xcompiler -fconstexpr-depth=100000000”)" inside the cmake file. This way, the nvcc compiles host code with your c++ compiler, passing in -Xcompiler “-fconstexpr-steps=1000000000” will forward that argument to the c++ compiler being used.

For some reason, it’s still failing. I’m using clang as my default toolchain/compiler, and still get the error message below. I can’t figure out what the problem is. Any help would be a godsend, and I appreicate your time!

Is the relevant code (which needs the flag) inside device or inside host functiosn?

1 Like

The issues been resolved! Thanks :)