-
Notifications
You must be signed in to change notification settings - Fork 710
Cabal doesn't pass cc-options to GHC when compiling ordinary Haskell sources #9801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
To reproduce, create a header with some definitions used for example bits could be like #ifndef MYDEF
#error "not defined"
#endif
static inline int myplus(int a, int b) { return a + b; } foreign import capi "myheader.h myplus" myplus :: CInt -> CInt -> CInt cc-options: -DMYDEF=1 My real case was related to compiling |
IMHO, |
cc-options: -DMYDEF=1 |
I agree. @zlonast, you recently did some work around passing of various options to various places. Would you be interested in taking a look at this issue? I imagine, having the context in your head might render this task trivial. |
Yes, let me try to solve the issue 👀 |
... however with CApiFFI, GHC will invoke C-compiler which may end up compile a large non-trivial amount of code (e.g.
CApiFFI
is a way to use header only libraries, without creating a dummy source for them).The text was updated successfully, but these errors were encountered: