These functions are now deprecated, but using the new infrastructure
makes everything more consistent. This is also sufficient for path
support on Windows, even before adopting the strongly typed paths.
There are two types, one to represent any kind of path, and one
that always represents a full absolute path. Conversion between
them is checked to ensure consistency.
The path types are templated on traits, which implement platform-
specific path behavior. They default to the appropriate traits
for the current platform, but are customizable as required. The
path format consists of three parts: a root, of which there can
be one (Unix) or many (Windows), and a path, which is separated
by path separators.
Separate from the process as it is only vaguely related and adding
unused user information to in-memory process contexts was extra code.
Windows support uses the SID as the user ID, as it matches the idea
of an identifer uniquely identifying a user or a group.
Windows is simpler than Unix in that it doesn't require fork just
just to set a working directory; it's more complex in that arguments
must be manually quoted rather than passed as an array.
- Set to use static or dynamic libraries at top level.
- Compiler configuration for MSVC and MinGW.
- Copy rather than create symlink for aliases on Windows.
Current implementation encodes auxiliary files into base64 string,
and pass it through system's base64 decoding to recreate files on
ninja build process.
This has two main disadvantages,
1. When auxiliary files are large, invocation call will expand
very large and shell will reject executing them.
2. base64 may not be compatible. (e.g. xcbuild's base64 encoded
data is not properly decoded by linux's base64 utility)
Instead, after build.ninja file has been written, also write
auxiliary file chunks in temporary directory with its hash included
in its filename. Ninja caches hashes of its execution command to determine
changes to the rule, so the actual rebuild logic is unchanged.
Sometime, xcbuild will be symlinked to different location.
If the xcbuild is symlinked, try to resolve symlinks and
and find relevent builtin tools in symlink source directory.
Swift modules and objc bridging headers needs to be present
before begining objc source compilation. Defer objc and other clang
compilation process until swift module compilation and other artifacts
copying is finished