Begins work on SR-237.
Rather than determining the number of jobs to use for `make` or
`dsymutil` from within build-script-impl, this change passed in those
values from above.
Furthermore, because we can determine the number of build jobs via a
builtin Python function, we figure out the number of jobs to use from
within `utils/build-script`. Now, by default, the same number of jobs
will be used to build this project as there are cores on the host
machine. Users may still specify a different number, as before, using
the `--jobs` option.
This introduces a behavioral change. Before, running
`utils/build-script` would run something like the following `cmake`
command:
```
cmake --build /build/Ninja-DebugAssert/llvm-macosx-x86_64 -- all
```
Notice the lack of jobs specified. The new default is something like
the following:
```
cmake --build /build/Ninja-DebugAssert/llvm-macosx-x86_64 -- -j8 all
```
Notice that the number of jobs is exlicitly passed to the command.
CMake supports generation of compilation databases. These have many uses, not
least of which is in supporting code-completion engines like
https://github.com/Valloric/YouCompleteMe.
Add the `--export-compile-commands` flag to `utils/build-script`.
Setting this flag passes `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON` to CMake,
which results in a `compile_commands.json` file being generated along
with built products like `cmark`, `llvm`, and `swift`.
This change adds a '-j' option to the top-level
build script. The computed defaults may not
always be suitable.
Tested by building for Ninja (default), Make (-m), and XCode (-x).
I also verified the jobs count via a process monitor.
This reverts commit b08610bc3e.
The check for LLDB build variant really needs to happen in
build-script-impl. build-script can still take options after
the '--' separator that may control the final determination
of the LLDB build variant. These weren't all being considered
by the logic in build-script.
The configuration script for Foundation respects debug and release builds so a new option for foundation-build-type has been added to control the build variant of Foundation.
Resolve the FIXME for adding a mechanism for a custom invocation of running the Foundation unit tests
Foundation now has an install target provided from the generated ninja script such that the potentially error prone install script is dramatically simplified into a single encapsulation of a ninja phony target of "install"; so adopt this new target for installation