Skip to content

Commit 4d74287

Browse files
authored
build : use umbrella Headers directory for XCFramework module map (#23974)
The XCFramework generated by build-xcframework.sh creates a module map that manually lists public headers. That list can fall out of sync with the framework's Headers directory. The module map is currently missing ggml-opt.h, which is present in the framework headers. This can cause downstream Apple builds to fail with: Include of non-modular header inside framework module 'llama' Use the framework's Headers directory itself as the module map umbrella instead of maintaining a manual header list. This makes all public headers under the generated framework's Headers directory part of the llama module.
1 parent 0066404 commit 4d74287

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

build-xcframework.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,7 @@ setup_framework_structure() {
130130
# Create module map (common for all platforms)
131131
cat > ${module_path}module.modulemap << EOF
132132
framework module llama {
133-
header "llama.h"
134-
header "ggml.h"
135-
header "ggml-alloc.h"
136-
header "ggml-backend.h"
137-
header "ggml-metal.h"
138-
header "ggml-cpu.h"
139-
header "ggml-blas.h"
140-
header "gguf.h"
133+
umbrella "Headers"
141134
142135
link "c++"
143136
link framework "Accelerate"

0 commit comments

Comments
 (0)