Closed
Description
It looks like the module map file is usually referenced as <llvm_root>/llvm/include/module.modulemap
and the line 17 in the Package.swift
doesn't seem to locate the module map correctly. That is, the llvmModuleMapPath
is resolved as <llvm_root>/llvm/include/llvm/module.modulemap
and doesn't match where the module map usually is.
guard let llvmHeaderPath = env["SWIFT_LLVM_BINDINGS_PATH_TO_LLVM_HEADERS"] else {
print("please pass an environment variable to swift-package: " +
"SWIFT_LLVM_BINDINGS_PATH_TO_LLVM_HEADERS " +
"(e.g. swift/llvm-project/llvm/include)")
return nil
}
let llvmModuleMapPath = "\(llvmHeaderPath)/llvm/module.modulemap". // line 17
I am quite new to LLVM and am very likely to be wrong. If without llvm
is intended, I can open a pr to fix it. :)