[bazel] Give ConstantFolding.cpp "-ftrapping-math" (for #137652)

I've introduced the split lib `AnalysisFpExc`. Let me know if better
solutions would be applicable.
This commit is contained in:
NAKAMURA Takumi
2025-04-30 16:13:01 +09:00
parent 7752e0a10b
commit b262785137

View File

@@ -1173,12 +1173,41 @@ cc_library(
],
)
AnalysisFpExcSrcs = [
"lib/Analysis/ConstantFolding.cpp",
]
cc_library(
name = "AnalysisFpExc",
srcs = AnalysisFpExcSrcs,
hdrs = glob(
[
"include/llvm/Analysis/*.h",
"include/llvm/Analysis/Utils/*.h",
],
),
copts = llvm_copts + ["-ftrapping-math"],
textual_hdrs = glob([
"include/llvm/Analysis/*.def",
]),
deps = [
":BinaryFormat",
":Core",
":Object",
":ProfileData",
":Support",
":TargetParser",
":config",
],
)
cc_library(
name = "Analysis",
srcs = glob(
[
"lib/Analysis/*.cpp",
],
exclude = AnalysisFpExcSrcs,
),
hdrs = glob(
[
@@ -1193,6 +1222,7 @@ cc_library(
"include/llvm/Analysis/*.def",
]),
deps = [
":AnalysisFpExc",
":BinaryFormat",
":Core",
":Object",