This patch adds support for defining the ABC location at runtime instead of at compil...
authorEthan Mahintorabi <ethanmoon@google.com>
Thu, 29 Oct 2020 01:59:59 +0000 (18:59 -0700)
committerEthan Mahintorabi <ethanmoon@google.com>
Thu, 29 Oct 2020 02:00:06 +0000 (19:00 -0700)
This change should be backwards compatible with the existing behavior.

passes/techmap/abc.cc

index ce50e9a5b39f272a1b1610321bbf6abfd13a70d6..66ac6828fcd237a0e99b13c43cba70986549e5c3 100644 (file)
@@ -1471,7 +1471,12 @@ struct AbcPass : public Pass {
                po_map.clear();
 
 #ifdef ABCEXTERNAL
-               std::string exe_file = ABCEXTERNAL;
+               std::string exe_file;
+               if (std::getenv("ABC")) {
+                       exe_file = std::getenv("ABC");
+               } else {
+                       exe_file = ABCEXTERNAL;
+               }
 #else
                std::string exe_file = proc_self_dirname() + proc_program_prefix() + "yosys-abc";
 #endif