-
Notifications
You must be signed in to change notification settings - Fork 464
Closed
Description
Right now, OCaml uses the compiler specified in the c_compiler field of ocamlc -config to compile C++ sources. We rely on the C compiler detecting the .cpp extension to decide that the language is C++. This works ok with gcc, but doesn't work so well with other C compilers such as clang.
As a result, people who are compiling C++ stubs with Dune have to manually add -x c++ -lstdc++ to their compilation flags, which is not ideal. Instead, we would like Dune to do this automatically. Since the flags are not the same for all C compilers, we will need to construct a small database with the flags for various well-known C compilers.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels