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`.
Currently prints 'Running Swift tests for:...' even if the skip-test-swift argument is set. Should only print this line if there are tests in the SWIFT_TEST_TARGETS array and they will not be skipped.
In the case some SKIP_TEST_* flag is set, and test_this_target is False for all targets, then SWIFT_TEST_TARGETS will be an empty array. Avoid printing 'Running Swift tests...' with an empty array.
This eliminates the need for the swig binary to be present.
This was already the case for OS X, but required extra cmake
arguments for cmake LLDB builds.
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 commit fixes two problems exposed by Makefile builds
(-m): (1) the cmark library directory is wrong and (2) the
COMMON_CMAKE_OPTIONS are not quoted when building swift (thus
"Unix Makefiles" ends up as two command line arguments).
Tested by building for Ninja (default), Make (-m), and XCode (-x).
Unlike our cmake-based builds we weren't setting an explicit target
triple or deployment target, which left us open to the vagaries of the
environment.
- Add darwin_ prefix to preset variables
- Add license header to utils/toolchain-codesign and utils/toolchain-installer
- Simplify the logic to remove Info.plist
This allows for the unit tests to properly find the module map file for
XCTest; this requires Foundation commit 3effff to properly forward the
extra swiftc flags to building the unit tests.