File tree Expand file tree Collapse file tree 7 files changed +11
-63
lines changed Expand file tree Collapse file tree 7 files changed +11
-63
lines changed Original file line number Diff line number Diff line change @@ -227,18 +227,17 @@ foreach(flag ${FLEX_BISON_WARN_SUPPRESS_FLAGS_TO_CHECK})
227
227
endif ()
228
228
endforeach ()
229
229
230
- #Suppress IPO link warnings
231
- set (IPO_LINK_WARN_SUPRESS_FLAGS " " )
232
- set (IPO_LINK_WARN_SUPRESS_FLAGS_TO_CHECK
233
- "-Wno-null-dereference"
234
- )
235
- foreach (flag ${IPO_LINK_WARN_SUPRESS_FLAGS_TO_CHECK} )
236
- CHECK_CXX_COMPILER_FLAG (${flag} CXX_COMPILER_SUPPORTS_${flag} )
237
- if (CXX_COMPILER_SUPPORTS_${flag} )
238
- #Flag supported, so enable it
239
- set (IPO_LINK_WARN_SUPRESS_FLAGS "${IPO_LINK_WARN_SUPRESS_FLAGS} ${flag} " )
240
- endif ()
241
- endforeach ()
230
+ # Suppress IPO link warnings.
231
+ # When IPO is turned on, it sometimes leads to false positives for warnings
232
+ # since it checks for warnings after some of the source files have been compiled.
233
+ # We globally suppress these warnings here. Any CMake executable which is added
234
+ # after this line.
235
+ if (CMAKE_INTERPROCEDURAL_OPTIMIZATION )
236
+ message (STATUS "IPO: Suppressing known VTR warnings." )
237
+ add_link_options (-Wno-alloc-size-larger-than # libarchfpga allocates C-style arrays using integers.
238
+ -Wno-stringop-overflow # EXTERNAL/capnproto has some string overflow warnings.
239
+ )
240
+ endif ()
242
241
243
242
#
244
243
# Sanitizer flags
Original file line number Diff line number Diff line change @@ -56,13 +56,6 @@ else()
56
56
${CMAKE_DL_LIBS}
57
57
)
58
58
59
- #Supress IPO link warnings if IPO is enabled
60
- get_target_property (TEST_BLIFEXPLORER_USES_IPO blifexplorer INTERPROCEDURAL_OPTIMIZATION )
61
- if (TEST_BLIFEXPLORER_USES_IPO )
62
- set_property (TARGET blifexplorer APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS} )
63
- endif ()
64
-
65
-
66
59
install (TARGETS blifexplorer DESTINATION bin )
67
60
68
61
endif ()
Original file line number Diff line number Diff line change @@ -57,12 +57,6 @@ target_compile_definitions(libarchfpga PUBLIC ${INTERCHANGE_SCHEMA_HEADERS})
57
57
add_executable (read_arch ${READ_ARCH_EXEC_SRC} )
58
58
target_link_libraries (read_arch libarchfpga )
59
59
60
- #Supress IPO link warnings if IPO is enabled
61
- get_target_property (READ_ARCH_USES_IPO read_arch INTERPROCEDURAL_OPTIMIZATION )
62
- if (READ_ARCH_USES_IPO )
63
- set_property (TARGET read_arch APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS} )
64
- endif ()
65
-
66
60
install (TARGETS libarchfpga DESTINATION bin )
67
61
install (FILES ${LIB_HEADERS} DESTINATION include /libarchfpga )
68
62
Original file line number Diff line number Diff line change @@ -184,11 +184,5 @@ foreach(ODIN_LINK_FLAG ${ODIN_EXTRA_LINK_FLAGS})
184
184
target_link_libraries (odin_ii ${ODIN_LINK_FLAG} )
185
185
endforeach ()
186
186
187
- #Supress IPO link warnings if IPO is enabled
188
- get_target_property (ODIN_USES_IPO odin_ii INTERPROCEDURAL_OPTIMIZATION )
189
- if (ODIN_USES_IPO )
190
- set_property (TARGET odin_ii APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS} )
191
- endif ()
192
-
193
187
install (TARGETS odin_ii libodin_ii DESTINATION bin )
194
188
install (FILES ${LIB_HEADERS} DESTINATION include /libodin_ii )
Original file line number Diff line number Diff line change @@ -27,12 +27,6 @@ target_link_libraries(fasm
27
27
add_executable (genfasm src/main.cpp )
28
28
target_link_libraries (genfasm fasm )
29
29
30
- #Supress IPO link warnings if IPO is enabled
31
- get_target_property (GENFASM_USES_IPO genfasm INTERPROCEDURAL_OPTIMIZATION )
32
- if (GENFASM_USES_IPO )
33
- set_property (TARGET genfasm APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS} )
34
- endif ()
35
-
36
30
#Specify link-time dependencies
37
31
install (TARGETS genfasm DESTINATION bin )
38
32
@@ -49,12 +43,6 @@ set(TEST_SOURCES
49
43
add_executable (test_fasm ${TEST_SOURCES} )
50
44
target_link_libraries (test_fasm fasm Catch2::Catch2WithMain )
51
45
52
- #Suppress IPO link warnings if IPO is enabled
53
- get_target_property (TEST_FASM_USES_IPO test_fasm INTERPROCEDURAL_OPTIMIZATION )
54
- if (TEST_FASM_USES_IPO )
55
- set_property (TARGET test_fasm APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS} )
56
- endif ()
57
-
58
46
add_test (
59
47
NAME test_fasm
60
48
COMMAND test_fasm --colour-mode ansi
Original file line number Diff line number Diff line change @@ -8,9 +8,3 @@ target_link_libraries(route_diag
8
8
libvpr
9
9
)
10
10
11
- #Suppress IPO link warnings if IPO is enabled
12
- get_target_property (TEST_ROUTE_DIAG_USES_IPO route_diag INTERPROCEDURAL_OPTIMIZATION )
13
- if (TEST_ROUTE_DIAG_USES_IPO )
14
- set_property (TARGET route_diag APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS} )
15
- endif ()
16
-
Original file line number Diff line number Diff line change @@ -175,14 +175,6 @@ add_executable(vpr ${EXEC_SOURCES})
175
175
target_link_libraries (vpr libvpr )
176
176
177
177
178
- #Suppress IPO link warnings if IPO is enabled
179
- get_target_property (VPR_USES_IPO vpr INTERPROCEDURAL_OPTIMIZATION )
180
- if (VPR_USES_IPO )
181
- set_property (TARGET vpr APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS} )
182
- endif ()
183
-
184
-
185
-
186
178
#
187
179
# Profile Guilded Optimization Configuration
188
180
#
@@ -303,12 +295,6 @@ target_link_libraries(test_vpr
303
295
Catch2::Catch2WithMain
304
296
libvpr )
305
297
306
- #Suppress IPO link warnings if IPO is enabled
307
- get_target_property (TEST_VPR_USES_IPO vpr INTERPROCEDURAL_OPTIMIZATION )
308
- if (TEST_VPR_USES_IPO )
309
- set_property (TARGET test_vpr APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS} )
310
- endif ()
311
-
312
298
add_test (NAME test_vpr
313
299
COMMAND test_vpr --colour-mode ansi
314
300
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} /test
You can’t perform that action at this time.
0 commit comments