Skip to content

Commit 33ae6ba

Browse files
committed
latest_vpr: turn off LTO and yosys EDA-3111
1 parent ea1d7c8 commit 33ae6ba

File tree

1 file changed

+56
-76
lines changed

1 file changed

+56
-76
lines changed

include/CMAKE_fix/PATCHED_vpr_latest/CMakeLists.txt

Lines changed: 56 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
1919
set (CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}" CACHE PATH "default install path" FORCE)
2020
endif()
2121

22-
set(VTR_IPO_BUILD "auto" CACHE STRING "Should VTR be compiled with interprocedural compiler optimizations?")
22+
set(VTR_IPO_BUILD "off" CACHE STRING "Should VTR be compiled with interprocedural compiler optimizations?")
2323
set_property(CACHE VTR_IPO_BUILD PROPERTY STRINGS auto on off)
2424

2525
#Allow the user to configure how much assertion checking should occur
@@ -37,20 +37,20 @@ option(SPEC_CPU "Enable SPEC CPU v8 support" OFF)
3737
#Allow the user to decide whether to compile the graphics library
3838
set(VPR_USE_EZGL "auto" CACHE STRING "Specify whether vpr uses the graphics library")
3939
set_property(CACHE VPR_USE_EZGL PROPERTY STRINGS auto off on)
40-
option(VTR_ENABLE_CAPNPROTO "Enable capnproto binary serialization support in VPR." ON)
40+
option(VTR_ENABLE_CAPNPROTO "Enable capnproto binary serialization support in VPR." OFF)
4141

4242
#Allow the user to decide whether to compile the server module
4343
option(VPR_USE_SERVER "Specify whether vpr enables the server mode" ON)
4444

4545
#Allow the user to enable/disable VPR analytic placement
4646
#VPR option --enable_analytic_placer is also required for Analytic Placement
4747
option(VPR_ANALYTIC_PLACE "Enable analytic placement in VPR." ON)
48-
option(VPR_ENABLE_INTERCHANGE "Enable FPGA interchange." ON)
48+
option(VPR_ENABLE_INTERCHANGE "Enable FPGA interchange." OFF)
4949
option(VPR_ENABLE_NOC_SAT_ROUTING "Enable NoC SAT routing." OFF)
5050

5151
option(WITH_BLIFEXPLORER "Enable build with blifexplorer" OFF)
5252

53-
option(WITH_ABC "Enable building abc" ON)
53+
option(WITH_ABC "Enable building abc" OFF)
5454
option(WITH_ODIN "Enable building odin" OFF)
5555
option(ODIN_DEBUG "Enable building odin with debug flags" OFF)
5656
option(ODIN_WARN "Enable building odin with extra warning flags" OFF)
@@ -59,7 +59,7 @@ option(ODIN_TIDY "Enable building odin with clang tidy" OFF)
5959
option(ODIN_SANITIZE "Enable building odin with sanitize flags" OFF)
6060

6161
# Allow the user to enable building Yosys
62-
option(WITH_PARMYS "Enable Yosys as elaborator and parmys-plugin as partial mapper" ON)
62+
option(WITH_PARMYS "Enable Yosys as elaborator and parmys-plugin as partial mapper" OFF)
6363
option(YOSYS_F4PGA_PLUGINS "Enable building and installing Yosys SystemVerilog and UHDM plugins" OFF)
6464

6565
set(VTR_VERSION_MAJOR 8)
@@ -104,27 +104,7 @@ set(CMAKE_CXX_EXTENSIONS OFF) #No compiler specific extensions
104104
#
105105
# Note that we manually clear the INTERPROCEDURAL_OPTIMIZATION flag on ABC later
106106
# to avoid cmake warnings
107-
include(CheckIPOSupported)
108-
check_ipo_supported(RESULT IPO_SUPPORTED)
109-
if (VTR_IPO_BUILD STREQUAL "on")
110-
if (IPO_SUPPORTED)
111-
message(STATUS "Building with IPO: on")
112-
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
113-
else()
114-
message(ERROR "Building with IPO unsupported with this compiler!")
115-
endif()
116-
elseif(VTR_IPO_BUILD STREQUAL "auto")
117-
if (IPO_SUPPORTED AND NOT CMAKE_BUILD_TYPE STREQUAL "debug")
118-
message(STATUS "Building with IPO: on (auto)")
119-
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
120-
else()
121-
message(STATUS "Building with IPO: off (auto)")
122-
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fPIC")
123-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fPIC")
124-
endif()
125-
else()
126-
message(STATUS "Building with IPO: off")
127-
endif()
107+
message(STATUS "Building with IPO: off")
128108

129109
#
130110
# Build type flags
@@ -136,8 +116,8 @@ if(NOT MSVC)
136116
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g3")
137117
endif()
138118

139-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
140-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
119+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -O3 -mavx2")
120+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -O3 -mavx2")
141121

142122
#
143123
# Warning flags
@@ -204,13 +184,13 @@ endif()
204184

205185
#Check and see if the compiler supports the various warning flags,
206186
#and add valid flags
207-
foreach(flag ${WARN_FLAGS_TO_CHECK})
208-
CHECK_CXX_COMPILER_FLAG(${flag} CXX_COMPILER_SUPPORTS_${flag})
209-
if(CXX_COMPILER_SUPPORTS_${flag})
210-
#Flag supported, so enable it
211-
set(WARN_FLAGS "${WARN_FLAGS} ${flag}")
212-
endif()
213-
endforeach()
187+
#foreach(flag ${WARN_FLAGS_TO_CHECK})
188+
# CHECK_CXX_COMPILER_FLAG(${flag} CXX_COMPILER_SUPPORTS_${flag})
189+
# if(CXX_COMPILER_SUPPORTS_${flag})
190+
# #Flag supported, so enable it
191+
# set(WARN_FLAGS "${WARN_FLAGS} ${flag}")
192+
# endif()
193+
#endforeach()
214194

215195
#The flex/bison code is not warning clean so we need to suppress some warnings
216196
set(FLEX_BISON_WARN_SUPPRESS_FLAGS "")
@@ -232,17 +212,17 @@ foreach(flag ${FLEX_BISON_WARN_SUPPRESS_FLAGS_TO_CHECK})
232212
endforeach()
233213

234214
#Suppress IPO link warnings
235-
set(IPO_LINK_WARN_SUPRESS_FLAGS " ")
236-
set(IPO_LINK_WARN_SUPRESS_FLAGS_TO_CHECK
237-
"-Wno-null-dereference"
238-
)
239-
foreach(flag ${IPO_LINK_WARN_SUPRESS_FLAGS_TO_CHECK})
240-
CHECK_CXX_COMPILER_FLAG(${flag} CXX_COMPILER_SUPPORTS_${flag})
241-
if(CXX_COMPILER_SUPPORTS_${flag})
242-
#Flag supported, so enable it
243-
set(IPO_LINK_WARN_SUPRESS_FLAGS "${IPO_LINK_WARN_SUPRESS_FLAGS} ${flag}")
244-
endif()
245-
endforeach()
215+
#set(IPO_LINK_WARN_SUPRESS_FLAGS " ")
216+
#set(IPO_LINK_WARN_SUPRESS_FLAGS_TO_CHECK
217+
# "-Wno-null-dereference"
218+
# )
219+
#foreach(flag ${IPO_LINK_WARN_SUPRESS_FLAGS_TO_CHECK})
220+
# CHECK_CXX_COMPILER_FLAG(${flag} CXX_COMPILER_SUPPORTS_${flag})
221+
# if(CXX_COMPILER_SUPPORTS_${flag})
222+
# #Flag supported, so enable it
223+
# set(IPO_LINK_WARN_SUPRESS_FLAGS "${IPO_LINK_WARN_SUPRESS_FLAGS} ${flag}")
224+
# endif()
225+
#endforeach()
246226

247227
#
248228
# Sanitizer flags
@@ -410,23 +390,23 @@ if(${WITH_ABC})
410390
add_subdirectory(abc)
411391
endif()
412392

413-
if(${WITH_PARMYS}) # define cmake params to compile Yosys
414-
add_definitions("-D_YOSYS_")
415-
416-
set(MAKE_PROGRAM "$(MAKE)")
417-
if(${CMAKE_GENERATOR} STREQUAL "Ninja")
418-
set(MAKE_PROGRAM "make")
419-
endif()
420-
421-
# Commented out since a make file should not call another make command with
422-
# threads. It should pass this information from the parent automatically.
423-
# if(NOT DEFINED "${CMAKE_BUILD_PARALLEL_LEVEL}")
424-
# set(CUSTOM_BUILD_PARALLEL_LEVEL 16)
425-
# else()
426-
# set(CUSTOM_BUILD_PARALLEL_LEVEL "${CMAKE_BUILD_PARALLEL_LEVEL}")
427-
# endif()
428-
add_subdirectory(yosys)
429-
endif()
393+
#if(${WITH_PARMYS}) # define cmake params to compile Yosys
394+
# add_definitions("-D_YOSYS_")
395+
#
396+
# set(MAKE_PROGRAM "$(MAKE)")
397+
# if(${CMAKE_GENERATOR} STREQUAL "Ninja")
398+
# set(MAKE_PROGRAM "make")
399+
# endif()
400+
#
401+
# # Commented out since a make file should not call another make command with
402+
# # threads. It should pass this information from the parent automatically.
403+
# # if(NOT DEFINED "${CMAKE_BUILD_PARALLEL_LEVEL}")
404+
# # set(CUSTOM_BUILD_PARALLEL_LEVEL 16)
405+
# # else()
406+
# # set(CUSTOM_BUILD_PARALLEL_LEVEL "${CMAKE_BUILD_PARALLEL_LEVEL}")
407+
# # endif()
408+
# add_subdirectory(yosys)
409+
#endif()
430410

431411
add_subdirectory(libs) #libs/CMakeLists.txt handles adding warnings flags to non-external libraries
432412

@@ -444,21 +424,21 @@ if(${WITH_ABC})
444424
endif()
445425
add_subdirectory(utils)
446426

447-
if(${WITH_ODIN})
448-
add_subdirectory(odin_ii)
449-
# blifexplorer depends on odin
450-
if(${WITH_BLIFEXPLORER})
451-
add_subdirectory(blifexplorer)
452-
endif()
453-
endif()
427+
#if(${WITH_ODIN})
428+
# add_subdirectory(odin_ii)
429+
# # blifexplorer depends on odin
430+
# if(${WITH_BLIFEXPLORER})
431+
# add_subdirectory(blifexplorer)
432+
# endif()
433+
#endif()
454434

455435
# handle cmake params to compile Yosys SystemVerilog/UHDM plugins
456-
if(${YOSYS_F4PGA_PLUGINS})
457-
# avoid compiling plugins in case the Parmys frontend is not active
458-
if(NOT ${WITH_PARMYS})
459-
message(SEND_ERROR "Utilizing SystemVerilog/UHDM plugins requires activating Parmys frontend. Please set WITH_PARMYS.")
460-
endif()
461-
endif()
436+
#if(${YOSYS_F4PGA_PLUGINS})
437+
# # avoid compiling plugins in case the Parmys frontend is not active
438+
# if(NOT ${WITH_PARMYS})
439+
# message(SEND_ERROR "Utilizing SystemVerilog/UHDM plugins requires activating Parmys frontend. Please set WITH_PARMYS.")
440+
# endif()
441+
#endif()
462442

463443
#Add extra compilation flags to suppress warnings from some libraries/tools
464444
# Note that target_compile_options() *appends* to the current compilation options of

0 commit comments

Comments
 (0)