1// It would've been nice to define this module in kern_private.modulemap, 2// but that results in a compiler error. Maybe clang only supports sourcing 3// multiple submodules from the same module map, but top level modules 4// require their own? 5 6// kern/debug.h gets its own top level module because it includes 7// <kern/kcdata.h>, which gets its own top level module outside of the 8// Darwin module to support building libkdd (one of our alias projects). 9// libkdd can’t use <kern/kcdata.h> because it doesn’t produce that header 10// itself, and so Xcode would pick up the old one in the SDK rather than 11// mapping to the new one in SRCROOT. To get around that, libkdd uses 12// <kcdata.h> to not match anything in the SDK and fall back on the one in 13// SRCROOT. So far so good, but libkdd needs to avoid accidentally also 14// picking up <kern/kcdata.h> via a module, or it will run into all kinds 15// of redeclaration sadness that the include guards somehow don’t block. 16// (Maybe because <kcdata.h> isn’t modular and <kern/kcdata.h> is?) libkdd 17// uses the Darwin module, and so <kern/kcdata.h> needs its own top level 18// module that sits on top of Darwin. libkdd uses the DarwinPrivate module 19// too, and so that can't transitively include <kern/kcdata.h> for the 20// reasons above. 21module kern_debug [system] { 22 header "kern/debug.h" 23 export * 24} 25