From e74186565d5b99f0a4b2fafea6106387a7851671 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Tue, 26 Nov 2013 18:46:55 -0500 Subject: [PATCH] Add --compiler clang to work around compiler bug, bug694. --- Changes | 2 ++ bin/verilator | 6 ++++++ src/V3Options.cpp | 5 ++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 810fe7db9..3f9af6fce 100644 --- a/Changes +++ b/Changes @@ -7,6 +7,8 @@ indicates the contributor was also the author of the fix; Thanks! *** Add UNPACKED warning to convert unpacked structs. [Jeremy Bennett] +*** Add --compiler clang to work around compiler bug, bug694. [Stefan Ludwig] + **** Support vpi_get of vpiSuppressVal, bug687. [Varun Koyyalagunta] **** Support vpi_get_time, bug688. [Varun Koyyalagunta] diff --git a/bin/verilator b/bin/verilator index 0b57e3f93..2a607c01e 100755 --- a/bin/verilator +++ b/bin/verilator @@ -469,6 +469,12 @@ Enables tunings and work-arounds for the specified C++ compiler. =over 4 +=item clang + +Tune for clang. This may reduce execution speed as it enables several +workarounds to avoid silly hardcoded limits in clang. This includes +breaking deep structures as for msvc as described below. + =item gcc Tune for Gnu C++, although generated code should work on almost any diff --git a/src/V3Options.cpp b/src/V3Options.cpp index 0acf37047..444f6bf8d 100644 --- a/src/V3Options.cpp +++ b/src/V3Options.cpp @@ -963,7 +963,10 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char } else if ( !strcmp (sw, "-compiler") && (i+1)