From 41d1d1bb7b045118705a1cad64d68a0d78343f52 Mon Sep 17 00:00:00 2001 From: Matt Liberty Date: Fri, 31 Jan 2025 03:08:36 +0000 Subject: [PATCH] Avoid parallel build conflicts (#198) The Liberty, Sdf, and Verilog parsers were writing to the same files causing random failures in parallel builds. position.hh and stack.hh are removed by switching to 3.0 to 3.2 in the require statement. location.hh is renamed per-parser with api.location.file. Signed-off-by: Matt Liberty --- liberty/LibertyParse.yy | 3 ++- liberty/LibertyScanner.hh | 2 +- sdf/SdfParse.yy | 3 ++- sdf/SdfScanner.hh | 2 +- verilog/VerilogParse.yy | 3 ++- verilog/VerilogScanner.hh | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/liberty/LibertyParse.yy b/liberty/LibertyParse.yy index df362a2e..9d75f238 100644 --- a/liberty/LibertyParse.yy +++ b/liberty/LibertyParse.yy @@ -38,11 +38,12 @@ #define loc_line(loc) loc.begin.line %} -%require "3.0" +%require "3.2" %skeleton "lalr1.cc" %debug %define api.namespace {sta} %locations +%define api.location.file "LibertyLocation.hh" %define parse.assert %parse-param { LibertyScanner *scanner } %parse-param { LibertyParser *reader } diff --git a/liberty/LibertyScanner.hh b/liberty/LibertyScanner.hh index 4e35c0cd..54eaf12a 100644 --- a/liberty/LibertyScanner.hh +++ b/liberty/LibertyScanner.hh @@ -30,7 +30,7 @@ #include #endif -#include "location.hh" +#include "LibertyLocation.hh" #include "LibertyParse.hh" namespace sta { diff --git a/sdf/SdfParse.yy b/sdf/SdfParse.yy index 1730daf7..023433b7 100644 --- a/sdf/SdfParse.yy +++ b/sdf/SdfParse.yy @@ -35,11 +35,12 @@ #pragma GCC diagnostic ignored "-Wunused-but-set-variable" %} -%require "3.0" +%require "3.2" %skeleton "lalr1.cc" %debug %define api.namespace {sta} %locations +%define api.location.file "SdfLocation.hh" %define parse.assert %parse-param { SdfScanner *scanner } %parse-param { SdfReader *reader } diff --git a/sdf/SdfScanner.hh b/sdf/SdfScanner.hh index ef74ccd3..4e4bd9ec 100644 --- a/sdf/SdfScanner.hh +++ b/sdf/SdfScanner.hh @@ -30,7 +30,7 @@ #include #endif -#include "location.hh" +#include "SdfLocation.hh" #include "SdfParse.hh" namespace sta { diff --git a/verilog/VerilogParse.yy b/verilog/VerilogParse.yy index c020c601..c06bb7a7 100644 --- a/verilog/VerilogParse.yy +++ b/verilog/VerilogParse.yy @@ -48,11 +48,12 @@ sta::VerilogParse::error(const location_type &loc, } %} -%require "3.0" +%require "3.2" %skeleton "lalr1.cc" %debug %define api.namespace {sta} %locations +%define api.location.file "VerilogLocation.hh" %define parse.assert %parse-param { VerilogScanner *scanner } %parse-param { VerilogReader *reader } diff --git a/verilog/VerilogScanner.hh b/verilog/VerilogScanner.hh index 2a080ac9..94838685 100644 --- a/verilog/VerilogScanner.hh +++ b/verilog/VerilogScanner.hh @@ -30,7 +30,7 @@ #include #endif -#include "location.hh" +#include "VerilogLocation.hh" #include "VerilogParse.hh" namespace sta {