From 699c0dbe80e4395370a4d2dc9816a4d18d85371f Mon Sep 17 00:00:00 2001 From: Jim Keener Date: Sat, 15 Feb 2025 20:38:30 -0500 Subject: [PATCH] iverilog current file search path (#4907) In the vein of commit ea72d66b "Verilator current file search path (#3500)" This includes the directory of the current file in the library search path. From `man iverilog`: -ylibdir Append the directory to the library module search path. When the compiler finds an undefined module, it looks in these directories for files with the right name. --- ale_linters/verilog/iverilog.vim | 1 + test/linter/test_iverilog.vader | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ale_linters/verilog/iverilog.vim b/ale_linters/verilog/iverilog.vim index e081f33f..54d55d79 100644 --- a/ale_linters/verilog/iverilog.vim +++ b/ale_linters/verilog/iverilog.vim @@ -5,6 +5,7 @@ call ale#Set('verilog_iverilog_options', '') function! ale_linters#verilog#iverilog#GetCommand(buffer) abort return 'iverilog -t null -Wall ' + \ . '-y%s:h ' \ . ale#Var(a:buffer, 'verilog_iverilog_options') \ . ' %t' endfunction diff --git a/test/linter/test_iverilog.vader b/test/linter/test_iverilog.vader index d7a29f05..5acf9b50 100644 --- a/test/linter/test_iverilog.vader +++ b/test/linter/test_iverilog.vader @@ -5,10 +5,10 @@ After: call ale#assert#TearDownLinterTest() Execute(The default iverilog command should be correct): - AssertLinter 'iverilog', 'iverilog -t null -Wall %t' + AssertLinter 'iverilog', 'iverilog -t null -Wall -y%s:h %t' Execute(iverilog options should be configurable): " Additional args for the linter let g:ale_verilog_iverilog_options = '-y.' - AssertLinter 'iverilog', 'iverilog -t null -Wall -y. %t' + AssertLinter 'iverilog', 'iverilog -t null -Wall -y%s:h -y. %t'