Skip to content

Commit

Permalink
Add the hs output dir to the C include dirs when compiling C code
Browse files Browse the repository at this point in the history
This allows C files in a package to include the _stub.h files
that ghc generates. This is needed for the C code to be able
to call the C functions exported using the FFI.
  • Loading branch information
dcoutts committed Apr 22, 2010
1 parent 77c5b4d commit 1c07b09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Distribution/Simple/GHC.hs
Expand Up @@ -845,7 +845,7 @@ constructCcCmdLine lbi bi clbi pref filename verbosity profiling
ghcCcOptions :: LocalBuildInfo -> BuildInfo -> ComponentLocalBuildInfo
-> FilePath -> [String]
ghcCcOptions lbi bi clbi odir
= ["-I" ++ dir | dir <- PD.includeDirs bi]
= ["-I" ++ dir | dir <- odir : PD.includeDirs bi]
++ ghcPackageDbOptions (withPackageDB lbi)
++ ghcPackageFlags lbi clbi
++ ["-optc" ++ opt | opt <- PD.ccOptions bi]
Expand Down

0 comments on commit 1c07b09

Please sign in to comment.