diff options
Diffstat (limited to 'xmake/rules/verilator/xmake.lua')
| -rw-r--r-- | xmake/rules/verilator/xmake.lua | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/xmake/rules/verilator/xmake.lua b/xmake/rules/verilator/xmake.lua index 6d9a0b7b0..a04d0cd55 100644 --- a/xmake/rules/verilator/xmake.lua +++ b/xmake/rules/verilator/xmake.lua @@ -30,18 +30,16 @@ rule("verilator.binary") import("verilator").config(target) end) - before_build_files(function (target, sourcebatch) - -- Just to avoid before_buildcmd_files being executed at build time + -- we need to generate cpp files before scanning c++ modules + -- https://github.com/xmake-io/xmake/issues/7624 + before_preparecmd_files(function(target, batchcmds, sourcebatch, opt) + import("verilator").buildcmd_vfiles(target, batchcmds, sourcebatch, opt) end) on_build_files(function (target, jobgraph, sourcebatch, opt) import("verilator").build_cppfiles(target, jobgraph, sourcebatch, opt) end, {jobgraph = true, batch = true, distcc = true}) - before_buildcmd_files(function(target, batchcmds, sourcebatch, opt) - import("verilator").buildcmd_vfiles(target, batchcmds, sourcebatch, opt) - end) - on_buildcmd_files(function (target, batchcmds, sourcebatch, opt) import("verilator").buildcmd_cppfiles(target, batchcmds, sourcebatch, opt) end) @@ -57,18 +55,14 @@ rule("verilator.static") import("verilator").config(target) end) - before_build_files(function (target, sourcebatch) - -- Just to avoid before_buildcmd_files being executed at build time + before_preparecmd_files(function(target, batchcmds, sourcebatch, opt) + import("verilator").buildcmd_vfiles(target, batchcmds, sourcebatch, opt) end) on_build_files(function (target, jobgraph, sourcebatch, opt) import("verilator").build_cppfiles(target, jobgraph, sourcebatch, opt) end, {jobgraph = true, batch = true, distcc = true}) - before_buildcmd_files(function(target, batchcmds, sourcebatch, opt) - import("verilator").buildcmd_vfiles(target, batchcmds, sourcebatch, opt) - end) - on_buildcmd_files(function (target, batchcmds, sourcebatch, opt) import("verilator").buildcmd_cppfiles(target, batchcmds, sourcebatch, opt) end) @@ -84,18 +78,14 @@ rule("verilator.shared") import("verilator").config(target) end) - before_build_files(function (target, sourcebatch) - -- Just to avoid before_buildcmd_files being executed at build time + before_preparecmd_files(function(target, batchcmds, sourcebatch, opt) + import("verilator").buildcmd_vfiles(target, batchcmds, sourcebatch, opt) end) on_build_files(function (target, jobgraph, sourcebatch, opt) import("verilator").build_cppfiles(target, jobgraph, sourcebatch, opt) end, {jobgraph = true, batch = true, distcc = true}) - before_buildcmd_files(function(target, batchcmds, sourcebatch, opt) - import("verilator").buildcmd_vfiles(target, batchcmds, sourcebatch, opt) - end) - on_buildcmd_files(function (target, batchcmds, sourcebatch, opt) import("verilator").buildcmd_cppfiles(target, batchcmds, sourcebatch, opt) end) |
