mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 11:02:04 +08:00
[Bazel] Fix --warn-backrefs errors in Analysis target (#170357)
Commit b262785 introduced a separate `AnalysisFpExc` target to try to
workaround the lack of a bazel equivalent of single source file
properties. However, this introduces backref errors when
`--warn-backrefs` is enabled.
This change alternatively just adds the `-ftrapping-math` copt to the
entire `Analysis` target.
Fix suggested by @rocallahan.
This commit is contained in:
@@ -1243,42 +1243,12 @@ 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",
|
||||
":target_library_info_gen",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "Analysis",
|
||||
srcs = glob(
|
||||
[
|
||||
"lib/Analysis/*.cpp",
|
||||
],
|
||||
exclude = AnalysisFpExcSrcs,
|
||||
),
|
||||
hdrs = glob(
|
||||
[
|
||||
@@ -1288,12 +1258,11 @@ cc_library(
|
||||
) + [
|
||||
"include/llvm-c/Analysis.h",
|
||||
],
|
||||
copts = llvm_copts,
|
||||
copts = llvm_copts + ["-ftrapping-math"],
|
||||
textual_hdrs = glob([
|
||||
"include/llvm/Analysis/*.def",
|
||||
]),
|
||||
deps = [
|
||||
":AnalysisFpExc",
|
||||
":BinaryFormat",
|
||||
":Core",
|
||||
":FrontendHLSL",
|
||||
|
||||
Reference in New Issue
Block a user