When LLVM is installed in a path containing spaces, paths output from llvm-config have no way to indicate breaks between parameters and spaces within paths. For example, --cflags on Windows for MSVC might include "-IC:\Program Files\LLVM\include" which parses as "-IC:\Program" "Files\LLVM\include". This could be fixed with escaping or quoting by llvm-config, perhaps as simple as quoting each individual element it emits. I believe quoting paths is portable to all major shells, though this would involve trading one error case (space in path) for another (quote in path) unless shell escaping logic were added. Adding quotes to the output might break some existing tools, but given the usual use case is feeding the output to a shell it may not be worth worrying about. Source issue: https://bitbucket.org/tari/llvm-sys.rs/issues/9/include-path-for-llvm-headers-on-windows
(In reply to comment #0) > This could be fixed with escaping or quoting by llvm-config, perhaps as > simple as quoting each individual element it emits. I believe quoting paths > is portable to all major shells, though this would involve trading one error > case (space in path) for another (quote in path) unless shell escaping logic > were added. IIRC the double-quote is not a legal pathname character on Windows, so using double-quote to handle paths with spaces should be fine.