Skip to content

Commit

Permalink
Fix building the model when the sail binary is not in $PATH
Browse files Browse the repository at this point in the history
In my build sail is installed to a custom prefix that I pass to CMake via
CMAKE_PREFIX_PATH instead of by overriding $PATH. Fix the one place in the
build where we were using a bare sail instead of ${SAIL_BIN}.
  • Loading branch information
arichardson authored and Timmmm committed Feb 9, 2025
1 parent 8ca0ac0 commit ec2a19c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ find_program(SAIL_BIN "sail")
if (NOT SAIL_BIN)
message(FATAL_ERROR "Sail not found. See README.md for installation instructions.")
endif()
message(STATUS "Found sail: ${SAIL_BIN}")

set(DEFAULT_ARCHITECTURES "rv32d;rv64d" CACHE STRING "Architectures to build by default (rv32f|rv64f|rv32d|rv64d)(_rvfi)? " )

Expand Down
2 changes: 1 addition & 1 deletion model/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ foreach (xlen IN ITEMS 32 64)
COMMENT "Building C code from Sail model (${arch})"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND
sail
${SAIL_BIN}
# Output file (without extension).
-o ${c_model_no_ext}
# Generate a file containing information about all possible branches.
Expand Down

0 comments on commit ec2a19c

Please sign in to comment.