-
Notifications
You must be signed in to change notification settings - Fork 108
/
dex.cabal
111 lines (103 loc) · 3.96 KB
/
dex.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
cabal-version: 2.2
-- Copyright 2019 Google LLC
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- https://developers.google.com/open-source/licenses/bsd
name: dex
version: 0.1.0.0
author: Dougal Maclaurin
maintainer: [email protected]
license-file: LICENSE
build-type: Simple
flag cuda
description: Enables building with CUDA support
default: False
flag optimized
description: Enables GHC optimizations
default: False
library dex-resources
if os(darwin)
exposed-modules: Resources
build-depends: base, bytestring, file-embed
hs-source-dirs: src/resources
default-language: Haskell2010
default-extensions: CPP
library
exposed-modules: Env, Syntax, Type, Inference, JIT, LLVMExec,
Parser, Util, Imp, Imp.Embed, Imp.Optimize,
PPrint, Algebra, Parallelize, Optimize, Serialize
Actor, Cat, Embed, Export,
RenderHtml, LiveOutput, Simplify, TopLevel,
Autodiff, Interpreter, Logging, CUDA,
LLVM.JIT, LLVM.Shims
build-depends: base, containers, mtl, bytestring,
llvm-hs-pure, llvm-hs,
-- Parsing
megaparsec, parser-combinators,
-- Text output
prettyprinter, text,
-- Portable system utilities
filepath, directory, ansi-terminal, process, temporary,
-- Serialization
store,
-- Notebook support
warp, wai, blaze-html, aeson, http-types, cmark, binary
if !os(darwin)
exposed-modules: Resources
hs-source-dirs: src/resources
build-depends: file-embed
else
build-depends: dex-resources
default-language: Haskell2010
hs-source-dirs: src/lib
ghc-options: -Wall -fPIC -threaded -optP-Wno-nonportable-include-path
cxx-sources: src/lib/dexrt.cpp
cxx-options: -std=c++11 -fPIC
default-extensions: CPP, DeriveTraversable, TypeApplications, OverloadedStrings,
TupleSections, ScopedTypeVariables, LambdaCase, PatternSynonyms,
BlockArguments
pkgconfig-depends: libpng
if flag(cuda)
include-dirs: /usr/local/cuda/include
extra-libraries: cuda
cxx-options: -DDEX_CUDA
cpp-options: -DDEX_CUDA
if flag(optimized)
ghc-options: -O3
else
ghc-options: -O0
executable dex
main-is: dex.hs
other-extensions: OverloadedStrings
build-depends: dex, base, haskeline, prettyprinter, mtl,
optparse-applicative, ansi-wl-pprint,
unix, store, bytestring, directory
if os(darwin)
build-depends: dex-resources
default-language: Haskell2010
hs-source-dirs: src
default-extensions: CPP, LambdaCase, BlockArguments
ghc-options: -optP-Wno-nonportable-include-path
if flag(optimized)
ghc-options: -O3
else
ghc-options: -O0
foreign-library Dex
type: native-shared
other-modules: Dex.Foreign.API, Dex.Foreign.Util, Dex.Foreign.JIT
, Dex.Foreign.Context, Dex.Foreign.Serialize
build-depends: base, mtl, containers, llvm-hs, dex, dex-resources
if os(darwin)
build-depends: dex-resources
hs-source-dirs: src/
c-sources: src/Dex/Foreign/rts.c
cc-options: -std=c11 -fPIC
ghc-options: -Wall -fPIC -optP-Wno-nonportable-include-path
default-language: Haskell2010
default-extensions: TypeApplications, ScopedTypeVariables, LambdaCase,
BlockArguments
if flag(optimized)
ghc-options: -O3
else
ghc-options: -O0