mistral: Fix nextpnr build with LLVM

Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
gatecat 2021-06-02 10:44:03 +01:00
parent 2bef7b5f7b
commit cbedf52342
3 changed files with 4 additions and 4 deletions

View File

@ -289,7 +289,7 @@ struct Arch : BaseArch<ArchRanges>
mistral::CycloneV *cyclonev;
Arch(ArchArgs args);
ArchArgs archArgs() const { return args; }
ArchArgs archArgs() const override { return args; }
std::string getChipName() const override { return args.device; }
// -------------------------------------------------

View File

@ -98,7 +98,7 @@ struct WireId
bool is_nextpnr_created() const
{
NPNR_ASSERT(node != invalid_rnode);
return CycloneV::rn2t(node) >= 128;
return unsigned(CycloneV::rn2t(node)) >= 128;
}
bool operator==(const WireId &other) const { return node == other.node; }

View File

@ -2,7 +2,7 @@ set(MISTRAL_ROOT "" CACHE STRING "Mistral install path")
aux_source_directory(${MISTRAL_ROOT}/lib MISTRAL_LIB_FILES)
add_library(mistral STATIC ${MISTRAL_LIB_FILES})
target_compile_options(mistral PRIVATE -Wno-maybe-uninitialized)
target_compile_options(mistral PRIVATE -Wno-maybe-uninitialized -Wno-uninitialized -Wno-unknown-warning-option)
find_package(LibLZMA REQUIRED)
@ -10,5 +10,5 @@ foreach(family_target ${family_targets})
target_include_directories(${family_target} PRIVATE ${MISTRAL_ROOT}/lib ${LIBLZMA_INCLUDE_DIRS})
target_link_libraries(${family_target} PRIVATE mistral ${LIBLZMA_LIBRARIES})
# Currently required to avoid issues with mistral (LTO means the warnings can end up in nextpnr)
target_link_options(${family_target} PRIVATE -Wno-maybe-uninitialized)
target_link_options(${family_target} PRIVATE -Wno-maybe-uninitialized -Wno-uninitialized -Wno-unknown-warning-option)
endforeach()