Closed Fuuzetsu closed 6 years ago
I can think of two approaches:
1) Put cbits/bctable.h
in the data files and define bctable_header = unsafePerformIO $ getDataFile "bctable.h"
2) Include the contents of cbits/bctable.h
verbatim in the generated C stub so no file needs to be found at build or runtime.
Are you suggesting that it's inlined in Plugin.hs? I'm not sure if it's that simple…
#include "path/to/bctable.h"
is inserted in a C stub in the plugin. Instead of doing this, we could expand the include with the contents of bctable.h
and remove bctable.h
from the repo.
This file includes a C header at compile time with TH:
This only works if we compile the file from the root of
inline-java
: this works fine for things likestack
but does not work for things likebazel
where the compilation might be occurring from "higher up". I don't know a good solution here.