Add --compiler clang to work around compiler bug, bug694.

This commit is contained in:
Wilson Snyder 2013-11-26 18:46:55 -05:00
parent 7e54281e26
commit e74186565d
3 changed files with 12 additions and 1 deletions

View File

@ -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]

View File

@ -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

View File

@ -963,7 +963,10 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char
}
else if ( !strcmp (sw, "-compiler") && (i+1)<argc) {
shift;
if (!strcmp (argv[i], "gcc")) {
if (!strcmp (argv[i], "clang")) {
m_compLimitParens = 80; // limit unknown
m_compLimitBlocks = 80; // limit unknown
} else if (!strcmp (argv[i], "gcc")) {
m_compLimitParens = 0;
} else if (!strcmp (argv[i], "msvc")) {
m_compLimitParens = 80; // 128, but allow some room