summaryrefslogtreecommitdiff
path: root/build-test.sh
diff options
context:
space:
mode:
authorSinan Kaya <sinan.kaya@microsoft.com>2019-03-18 02:32:13 (GMT)
committerSinan Kaya <sinan.kaya@microsoft.com>2019-03-18 13:18:49 (GMT)
commit5bc76805829a6202a5d73ac22f21a6b2eb528507 (patch)
tree9bb521a2e2b310cad781e2e5eba0ccc893c2620a /build-test.sh
parent1609b9791ff30bbefed7e6fb2eb42b4aea2d98f9 (diff)
downloadcoreclr-5bc76805829a6202a5d73ac22f21a6b2eb528507.zip
coreclr-5bc76805829a6202a5d73ac22f21a6b2eb528507.tar.gz
coreclr-5bc76805829a6202a5d73ac22f21a6b2eb528507.tar.bz2
Support gcc for build-test.sh
Diffstat (limited to 'build-test.sh')
-rwxr-xr-xbuild-test.sh40
1 files changed, 39 insertions, 1 deletions
diff --git a/build-test.sh b/build-test.sh
index 598e015..d845185 100755
--- a/build-test.sh
+++ b/build-test.sh
@@ -437,7 +437,11 @@ build_native_projects()
# Regenerate the CMake solution
# Force cross dir to point to project root cross dir, in case there is a cross build.
scriptDir="$__ProjectRoot/src/pal/tools"
- nextCommand="CONFIG_DIR=\"$__ProjectRoot/cross\" \"$scriptDir/gen-buildsys-clang.sh\" \"$__TestDir\" $__ClangMajorVersion $__ClangMinorVersion $platformArch $scriptDir $__BuildType $__CodeCoverage $generator $extraCmakeArguments $__cmakeargs"
+ if [[ $__GccBuild == 0 ]]; then
+ nextCommand="CONFIG_DIR=\"$__ProjectRoot/cross\" \"$scriptDir/gen-buildsys-clang.sh\" \"$__TestDir\" $__ClangMajorVersion $__ClangMinorVersion $platformArch $scriptDir $__BuildType $__CodeCoverage $generator $extraCmakeArguments $__cmakeargs"
+ else
+ nextCommand="CONFIG_DIR=\"$__ProjectRoot/cross\" \"$scriptDir/gen-buildsys-gcc.sh\" \"$__TestDir\" \"$__GccMajorVersion\" \"$__GccMinorVersion\" $platformArch $scriptDir $__BuildType $__CodeCoverage $generator $extraCmakeArguments $__cmakeargs"
+ fi
echo "Invoking $nextCommand"
eval $nextCommand
popd
@@ -476,6 +480,7 @@ usage()
echo "coverage - optional argument to enable code coverage build (currently supported only for Linux and OSX)."
echo "ninja - target ninja instead of GNU make"
echo "clangx.y - optional argument to build using clang version x.y - supported version 3.5 - 6.0"
+ echo "gccx.y - optional argument to build using gcc version x.y."
echo "cross - optional argument to signify cross compilation,"
echo " - will use ROOTFS_DIR environment variable if set."
echo "portableLinux - build for Portable Linux Distribution"
@@ -602,6 +607,9 @@ __ConfigureOnly=0
__CrossBuild=0
__ClangMajorVersion=0
__ClangMinorVersion=0
+__GccBuild=0
+__GccMajorVersion=0
+__GccMinorVersion=0
__NuGetPath="$__PackagesDir/NuGet.exe"
__SkipRestorePackages=0
__DistroRid=""
@@ -727,6 +735,36 @@ while :; do
__ClangMinorVersion=0
;;
+ gcc5|-gcc5)
+ __GccMajorVersion=5
+ __GccMinorVersion=
+ __GccBuild=1
+ ;;
+
+ gcc6|-gcc6)
+ __GccMajorVersion=6
+ __GccMinorVersion=
+ __GccBuild=1
+ ;;
+
+ gcc7|-gcc7)
+ __GccMajorVersion=7
+ __GccMinorVersion=
+ __GccBuild=1
+ ;;
+
+ gcc8|-gcc8)
+ __GccMajorVersion=8
+ __GccMinorVersion=
+ __GccBuild=1
+ ;;
+
+ gcc|-gcc)
+ __GccMajorVersion=
+ __GccMinorVersion=
+ __GccBuild=1
+ ;;
+
ninja)
__UseNinja=1
;;