bindgen
bindgen copied to clipboard
Windows support
Trying to compile bindgen on Windows produces first error in find_clang.cr on:
UNAME_S = `uname -s`.chomp
We need to replace this with a macro:
{% if flag?(:darwin) %} # :linux, :win32, :windows, :bits64, :bits32
Updated in latest commit. Will keep the ticket open for further issues.
find_llvm_config_binary - Need to use ENV["PATH"].split(Process::PATH_DELIMITER) also, in same function - need to account for file ext of ".exe" , not sure where to put this. Also replace the search_paths: in YAML to #{paths.try(&.map { |p| %(- '#{p}') }.join("\n ")) || ENV["PATH"].split(Process::PATH_DELIMITER).map { |p| %(- '#{p}') }.join("\n ")}
this is because "" in windows paths and this is escape character for YAML - replace double quote to single quote
Same thing for #find_clang_binary