From 191c71edead666091aaabde6b0941e9134b8a451 Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Thu, 23 Feb 2023 23:27:29 +0100 Subject: [PATCH] Fix cmake on macOS to mark weak symbols with -U linker flag (#3978) (#3979) Co-authored-by: Peter Debacker --- docs/CONTRIBUTORS | 1 + verilator-config.cmake.in | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/CONTRIBUTORS b/docs/CONTRIBUTORS index 6b83ecfdb..ee8a4c5a0 100644 --- a/docs/CONTRIBUTORS +++ b/docs/CONTRIBUTORS @@ -105,6 +105,7 @@ Nathan Myers Patrick Stewart Paul Wright Pawel Sagan +Peter Debacker Peter Horvath Peter Monsson Philipp Wagner diff --git a/verilator-config.cmake.in b/verilator-config.cmake.in index a650cbd64..ae36b961e 100644 --- a/verilator-config.cmake.in +++ b/verilator-config.cmake.in @@ -78,6 +78,10 @@ if (NOT CMAKE_CXX_COMPILER_ID MATCHES MSVC) endif() endif() +if (${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang") + add_link_options(-Wl,-U,__Z15vl_time_stamp64v,-U,__Z13sc_time_stampv) +endif() + define_property(TARGET PROPERTY VERILATOR_THREADED BRIEF_DOCS "Deprecated and has no effect (ignored)"