pub enum Origin {
User,
Compiler,
Sysroot,
Bundled,
Kernel,
Host,
}Expand description
Which of section 8.5’s four steps put a directory in the list.
Carried rather than discarded because -print-search-dirs has to say it, because a user
debugging a wrong header needs to know which rule chose it, and because the test that no host
directory appears in a cross build is written against this rather than against path spelling.
Variants§
User
Step 1. A -I the user gave, in the position they gave it.
Compiler
Step 2. The compiler’s own headers, which describe the compiler rather than the platform.
Sysroot
Step 3, taken from a --sysroot or -isysroot the user named.
Bundled
Step 3, taken from the tree we bundle for this target.
Kernel
Step 3, taken from the kernel header tree, which is bundled too and is not the libc’s.
Separate from Origin::Bundled because the two trees have different owners, different
licences and different producers, and a user looking at where linux/stat.h came from is
asking about the kernel and not about glibc.
Host
Step 3, taken from the host, which is legal only when the target is the host.