summaryrefslogtreecommitdiff
path: root/src/pal
diff options
context:
space:
mode:
authorPat Gavlin <pagavlin@microsoft.com>2015-11-08 20:00:30 -0800
committerPat Gavlin <pagavlin@microsoft.com>2015-11-09 07:32:25 -0800
commitdc0c7c457386bf666f41dd579836d9558a8f5775 (patch)
tree1df37dd3b21d526ad8b02859e4e919c24e7cce4b /src/pal
parenta72f38249d416b02abaa95e6cf0d61da06d7692e (diff)
downloadcoreclr-dc0c7c457386bf666f41dd579836d9558a8f5775.tar.gz
coreclr-dc0c7c457386bf666f41dd579836d9558a8f5775.tar.bz2
coreclr-dc0c7c457386bf666f41dd579836d9558a8f5775.zip
Add support for ninja to the CoreCLR build.
Just what it says on the tin.
Diffstat (limited to 'src/pal')
-rwxr-xr-xsrc/pal/tools/gen-buildsys-clang.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/pal/tools/gen-buildsys-clang.sh b/src/pal/tools/gen-buildsys-clang.sh
index 790014e9f1..31e83ef029 100755
--- a/src/pal/tools/gen-buildsys-clang.sh
+++ b/src/pal/tools/gen-buildsys-clang.sh
@@ -3,15 +3,16 @@
# This file invokes cmake and generates the build system for gcc.
#
-if [ $# -lt 4 -o $# -gt 6 ]
+if [ $# -lt 4 -o $# -gt 7 ]
then
echo "Usage..."
- echo "gen-buildsys-clang.sh <path to top level CMakeLists.txt> <ClangMajorVersion> <ClangMinorVersion> <Architecture> [build flavor] [coverage]"
+ echo "gen-buildsys-clang.sh <path to top level CMakeLists.txt> <ClangMajorVersion> <ClangMinorVersion> <Architecture> [build flavor] [coverage] [ninja]"
echo "Specify the path to the top level CMake file - <ProjectK>/src/NDP"
echo "Specify the clang version to use, split into major and minor version"
echo "Specify the target architecture."
echo "Optionally specify the build configuration (flavor.) Defaults to DEBUG."
echo "Optionally specify 'coverage' to enable code coverage build."
+ echo "Target ninja instead of make. ninja must be on the PATH."
exit 1
fi
@@ -37,6 +38,7 @@ build_arch="$4"
buildtype=DEBUG
code_coverage=OFF
build_tests=OFF
+generator="Unix Makefiles"
for i in "${@:5}"; do
upperI="$(echo $i | awk '{print toupper($0)}')"
@@ -53,6 +55,9 @@ for i in "${@:5}"; do
echo "Including tests directory in build."
build_tests=ON
;;
+ NINJA)
+ generator=Ninja
+ ;;
*)
echo "Ignoring unknown arg '$i'"
esac
@@ -127,6 +132,7 @@ if [[ -n "$CROSSCOMPILE" ]]; then
fi
cmake \
+ -G "$generator" \
"-DCMAKE_USER_MAKE_RULES_OVERRIDE=$1/src/pal/tools/clang-compiler-override.txt" \
"-DCMAKE_AR=$llvm_ar" \
"-DCMAKE_LINKER=$llvm_link" \