-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathglean-clang.cabal
More file actions
163 lines (149 loc) · 4.1 KB
/
Copy pathglean-clang.cabal
File metadata and controls
163 lines (149 loc) · 4.1 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
cabal-version: 3.6
-- Copyright (c) Facebook, Inc. and its affiliates.
name: glean-clang
version: 0.1.0.0
synopsis: C++ code indexing infrastructure for Glean
homepage: https://github.com/facebookincubator/Glean
bug-reports: https://github.com/facebookincubator/Glean/issues
license: BSD-3-Clause
license-file: LICENSE
author: Facebook, Inc.
maintainer: Glean-team@fb.com
copyright: (c) Facebook, All Rights Reserved
build-type: Custom
-- These bits of code live in their own package because we want the custom setup
-- to detect LLVM/clang, but this is not compatible with glean.cabal's use of
-- multiple (public) libraries:
--
-- Error:
-- Internal libraries only supported with per-component builds.
-- Per-component builds were disabled because build-type is Custom
-- In the inplace package 'glean-0.1.0.0'
-- Custom setup used to detect LLVM (and clang) and configure the appropriate
-- include/library directories, necessary for 'glean-clang-index' C++ program
-- which uses the clang/llvm libraries.
custom-setup
setup-depends:
base,
Cabal >= 3.6,
containers
flag opt
default: False
common deps
build-depends:
ansi-terminal >= 0.11 && < 1.2,
array ^>=0.5.2.0,
async ^>=2.2.1,
base >=4.11.1 && <4.21,
containers,
data-default,
deepseq >=1.4.3.0 && < 1.6,
directory ^>=1.3.1.5,
fb-util,
filepath >=1.4.2 && < 1.6,
optparse-applicative,
process ^>=1.6.3.0,
stm ^>=2.5.0.0,
temporary,
text >=1.2.3.0 && < 2.2,
thrift-lib,
unordered-containers ^>=0.2.9.0,
vector >=0.12.0.1 && <0.14,
common exe
ghc-options: -threaded
common fb-haskell
default-language: Haskell2010
default-extensions:
BangPatterns
BinaryLiterals
DataKinds
DeriveDataTypeable
DeriveGeneric
EmptyCase
ExistentialQuantification
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
LambdaCase
MultiParamTypeClasses
MultiWayIf
NoMonomorphismRestriction
OverloadedStrings
PatternSynonyms
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TupleSections
TypeFamilies
TypeSynonymInstances
NondecreasingIndentation
ghc-options: -Wall -Wno-orphans -Wno-name-shadowing
if flag(opt)
ghc-options: -O2
common fb-cpp
cxx-options: -DOSS=1 -std=c++17 -Wno-nullability-completeness
if arch(x86_64)
cxx-options: -DGLEAN_X86_64 -march=haswell
if flag(opt)
cxx-options: -O3
flag use-folly-clib
default: False
common folly
if flag(use-folly-clib)
build-depends: fb-util >= 0.2, folly-clib
else
build-depends: fb-util < 0.2
pkgconfig-depends: libfolly
executable clang-index
import: fb-cpp, folly
ghc-options: -no-hs-main
main-is: index.cpp
cxx-sources:
action.cpp,
ast.cpp,
db.cpp,
hash.cpp,
path.cpp,
preprocessor.cpp,
build-depends:
glean:rts,
glean:client-cpp,
extra-libraries:
clang-cpp,
LLVM,
glog,
pthread,
fmt,
gflags,
atomic,
re2
cxx-options: -fexceptions -DOSS=1 -std=c++17
if arch(x86_64)
cxx-options: -DGLEAN_X86_64 -march=haswell
if flag(opt)
cxx-options: -O3
executable clang-derive
import: fb-haskell, fb-cpp, deps, exe
main-is: Derive.hs
hs-source-dirs: .
ghc-options: -main-is Derive
build-depends:
ghc-compact,
glean:client-hs,
glean:client-hs-local,
glean:lib,
glean:lib-derive,
glean:schema,
glean:util,
vector-algorithms
other-modules:
Derive.Common
Derive.CxxDeclarationSources
Derive.CxxSame
Derive.CxxTargetUses
Derive.Env
Derive.Generic
Derive.Lib
Derive.Types