Skip to content

Commit

Permalink
Error when trying to build aarch64 with LLVM 12 and below
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Sep 19, 2024
1 parent edfe1f4 commit 505e5f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/compiler/crystal/compiler.cr
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,13 @@ module Crystal
end

private def codegen(program, node : ASTNode, sources, output_filename)
{% if LibLLVM::IS_LT_130 %}
if @codegen_target.architecture == "aarch64"
stderr.puts "Error: Target #{@codegen_target} is unavailable with LLVM 12 or lower."
exit 1
end
{% end %}

llvm_modules = @progress_tracker.stage("Codegen (crystal)") do
program.codegen node, debug: debug, frame_pointers: frame_pointers,
single_module: @single_module || @cross_compile || !@emit_targets.none?
Expand Down

0 comments on commit 505e5f5

Please sign in to comment.