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