debug wip
This commit is contained in:
parent
ce742e4763
commit
346e558e0a
2
build
2
build
@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# generate this file from Nix config for now to avoid duplication?
|
||||
|
||||
cargo build --manifest-path ./rust/Cargo.toml
|
||||
|
||||
BUNDLED_LIB_DIR=$(cabal list-bin . | sed -e 's=x/garnet/build/garnet/garnet=build=g')
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
};
|
||||
packages.garnet.components.library = {
|
||||
preBuild = addLibcIncludeDir;
|
||||
# try removing?
|
||||
preConfigure = ''
|
||||
mkdir -p rust/target/debug
|
||||
ln -s ${garnet-rs}/include/garnet_rs.h rust/target/debug/garnet_rs.h
|
||||
|
||||
10
garnet.cabal
10
garnet.cabal
@ -14,6 +14,14 @@ extra-source-files:
|
||||
-- extra-tmp-files:
|
||||
-- rust/target/debug/garnet_rs.h
|
||||
|
||||
-- actually maybe this is pointless given we always need debug path anyway in `extra-source-files`
|
||||
-- plus we have it in `Raw.hs`
|
||||
flag dev
|
||||
default:
|
||||
False
|
||||
manual:
|
||||
True
|
||||
|
||||
common common
|
||||
default-language: GHC2024
|
||||
default-extensions:
|
||||
@ -50,6 +58,8 @@ library
|
||||
GarnetRs.Raw
|
||||
GarnetRs.Wrapped
|
||||
hs-source-dirs: lib
|
||||
-- if flag (dev)
|
||||
-- include-dirs: rust/target/debug
|
||||
include-dirs: rust/target/debug
|
||||
-- HLS gives up entirely when the header is malformed if we do this
|
||||
-- and anyway, I don't think it gives us dependency tracking like `extra-source-files` does
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user