Skip to content

Commit b262785

Browse files
committed
[bazel] Give ConstantFolding.cpp "-ftrapping-math" (for llvm#137652)
I've introduced the split lib `AnalysisFpExc`. Let me know if better solutions would be applicable.
1 parent 7752e0a commit b262785

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

utils/bazel/llvm-project-overlay/llvm/BUILD.bazel

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,12 +1173,41 @@ cc_library(
11731173
],
11741174
)
11751175

1176+
AnalysisFpExcSrcs = [
1177+
"lib/Analysis/ConstantFolding.cpp",
1178+
]
1179+
1180+
cc_library(
1181+
name = "AnalysisFpExc",
1182+
srcs = AnalysisFpExcSrcs,
1183+
hdrs = glob(
1184+
[
1185+
"include/llvm/Analysis/*.h",
1186+
"include/llvm/Analysis/Utils/*.h",
1187+
],
1188+
),
1189+
copts = llvm_copts + ["-ftrapping-math"],
1190+
textual_hdrs = glob([
1191+
"include/llvm/Analysis/*.def",
1192+
]),
1193+
deps = [
1194+
":BinaryFormat",
1195+
":Core",
1196+
":Object",
1197+
":ProfileData",
1198+
":Support",
1199+
":TargetParser",
1200+
":config",
1201+
],
1202+
)
1203+
11761204
cc_library(
11771205
name = "Analysis",
11781206
srcs = glob(
11791207
[
11801208
"lib/Analysis/*.cpp",
11811209
],
1210+
exclude = AnalysisFpExcSrcs,
11821211
),
11831212
hdrs = glob(
11841213
[
@@ -1193,6 +1222,7 @@ cc_library(
11931222
"include/llvm/Analysis/*.def",
11941223
]),
11951224
deps = [
1225+
":AnalysisFpExc",
11961226
":BinaryFormat",
11971227
":Core",
11981228
":Object",

0 commit comments

Comments
 (0)