mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Fix Mingw Compilation (#4675)
This commit is contained in:
parent
5ba7084815
commit
9a65ed4ce2
@ -35,7 +35,7 @@ if (NOT WIN32)
|
|||||||
message(WARNING "CMake support on Linux/OSX is experimental.")
|
message(WARNING "CMake support on Linux/OSX is experimental.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (MSVC)
|
if (WIN32)
|
||||||
if (DEFINED ENV{WIN_FLEX_BISON})
|
if (DEFINED ENV{WIN_FLEX_BISON})
|
||||||
set(WIN_FLEX_BISON "$ENV{WIN_FLEX_BISON}")
|
set(WIN_FLEX_BISON "$ENV{WIN_FLEX_BISON}")
|
||||||
endif()
|
endif()
|
||||||
|
@ -26,6 +26,7 @@ Conor McCullough
|
|||||||
Dan Petrisko
|
Dan Petrisko
|
||||||
Daniel Bates
|
Daniel Bates
|
||||||
David Horton
|
David Horton
|
||||||
|
David Ledger
|
||||||
David Metz
|
David Metz
|
||||||
David Stanford
|
David Stanford
|
||||||
David Turner
|
David Turner
|
||||||
|
@ -466,7 +466,7 @@ set_target_properties(${verilator} PROPERTIES
|
|||||||
#UNITY_BUILD $<IF:$<CONFIG:DEBUG>,FALSE,${CMAKE_UNITY_BUILD}>
|
#UNITY_BUILD $<IF:$<CONFIG:DEBUG>,FALSE,${CMAKE_UNITY_BUILD}>
|
||||||
MSVC_RUNTIME_LIBRARY MultiThreaded$<IF:$<CONFIG:Release>,,DebugDLL>
|
MSVC_RUNTIME_LIBRARY MultiThreaded$<IF:$<CONFIG:Release>,,DebugDLL>
|
||||||
#JOB_POOL_LINK one_job # Linking takes lots of resources
|
#JOB_POOL_LINK one_job # Linking takes lots of resources
|
||||||
INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE
|
INTERPROCEDURAL_OPTIMIZATION_RELEASE $<IF:MINGW,FALSE,TRUE>
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(${verilator}
|
add_dependencies(${verilator}
|
||||||
@ -501,13 +501,19 @@ target_include_directories(${verilator}
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_compile_options(${verilator} PRIVATE /bigobj)
|
if(MINGW)
|
||||||
|
target_compile_options(${verilator} PRIVATE -Wa,-mbig-obj)
|
||||||
|
target_link_options(${verilator} PRIVATE -Wl,--stack,10000000 -mconsole -lcomctl32 -DWIN_32_LEAN_AND_MEAN)
|
||||||
|
else()
|
||||||
|
target_compile_options(${verilator} PRIVATE /bigobj)
|
||||||
|
target_link_options(${verilator} PRIVATE /STACK:10000000)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_compile_definitions(${verilator} PRIVATE
|
target_compile_definitions(${verilator} PRIVATE
|
||||||
YY_NO_UNISTD_H
|
YY_NO_UNISTD_H
|
||||||
)
|
)
|
||||||
target_include_directories(${verilator} PRIVATE ../platform/win32)
|
target_include_directories(${verilator} PRIVATE ../platform/win32)
|
||||||
target_link_libraries(${verilator} PRIVATE bcrypt psapi)
|
target_link_libraries(${verilator} PRIVATE bcrypt psapi)
|
||||||
target_link_options(${verilator} PRIVATE /STACK:10000000)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS ${verilator})
|
install(TARGETS ${verilator})
|
||||||
|
Loading…
Reference in New Issue
Block a user