1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

Fail gracefully if no inlining model is available to download.

Differential Revision: https://reviews.llvm.org/D104829
This commit is contained in:
Jacob Hegna 2021-06-23 05:22:18 +00:00
parent 4a2c6265d9
commit 15460e3887

View File

@ -88,6 +88,11 @@ endfunction()
function(tf_find_and_compile model default_url default_path generation_config tag_set signature_def_key fname cpp_class)
if ("${model}" STREQUAL "download")
# Crash if the user wants to download a model but a URL is set to "TO_BE_UPDATED"
if ("${LLVM_INLINER_MODEL_CURRENT_URL}" STREQUAL "TO_BE_UPDATED")
message(FATAL_ERROR "LLVM_INLINER_MODEL_PATH was set to 'download' but there is no model url currently specified in cmake - likely, the model interface recently changed, and so there is not a released model available.")
endif()
set(model ${default_url})
endif()