Skip to content

Commit

Permalink
Merge pull request dotnet/coreclr#23179 from franksinankaya/gcc_clean…
Browse files Browse the repository at this point in the history
…up_11

Correct current script dir detection for GCC

Commit migrated from dotnet/coreclr@7c0849e
  • Loading branch information
janvorli authored Mar 18, 2019
2 parents 91b83dc + d8d3951 commit f6cbe70
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 294 deletions.
41 changes: 40 additions & 1 deletion src/coreclr/build-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,12 @@ build_native_projects()
pushd "$intermediatesForBuild"
# Regenerate the CMake solution
# Force cross dir to point to project root cross dir, in case there is a cross build.
nextCommand="CONFIG_DIR=\"$__ProjectRoot/cross\" \"$__ProjectRoot/src/pal/tools/gen-buildsys-clang.sh\" \"$__TestDir\" $__ClangMajorVersion $__ClangMinorVersion $platformArch $__BuildType $__CodeCoverage $generator $extraCmakeArguments $__cmakeargs"
scriptDir="$__ProjectRoot/src/pal/tools"
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
Expand Down Expand Up @@ -475,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"
Expand Down Expand Up @@ -601,6 +607,9 @@ __ConfigureOnly=0
__CrossBuild=0
__ClangMajorVersion=0
__ClangMinorVersion=0
__GccBuild=0
__GccMajorVersion=0
__GccMinorVersion=0
__NuGetPath="$__PackagesDir/NuGet.exe"
__SkipRestorePackages=0
__DistroRid=""
Expand Down Expand Up @@ -726,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
;;
Expand Down
21 changes: 17 additions & 4 deletions src/coreclr/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -276,16 +276,17 @@ build_native()
pushd "$intermediatesForBuild"
# Regenerate the CMake solution

scriptDir="$__ProjectRoot/src/pal/tools"
if [[ $__GccBuild == 0 ]]; then
scan_build=
if [[ $__StaticAnalyzer == 1 ]]; then
scan_build=scan-build
fi
echo "Invoking \"$__ProjectRoot/src/pal/tools/gen-buildsys-clang.sh\" \"$__ProjectRoot\" $__ClangMajorVersion \"$__ClangMinorVersion\" $platformArch $__BuildType $__CodeCoverage $scan_build $generator $extraCmakeArguments $__cmakeargs"
source "$__ProjectRoot/src/pal/tools/gen-buildsys-clang.sh" "$__ProjectRoot" $__ClangMajorVersion "$__ClangMinorVersion" $platformArch $__BuildType $__CodeCoverage $scan_build $generator "$extraCmakeArguments" "$__cmakeargs"
echo "Invoking \"$scriptDir/gen-buildsys-clang.sh\" \"$__ProjectRoot\" $__ClangMajorVersion \"$__ClangMinorVersion\" $platformArch "$scriptDir" $__BuildType $__CodeCoverage $scan_build $generator $extraCmakeArguments $__cmakeargs"
source "$scriptDir/gen-buildsys-clang.sh" "$__ProjectRoot" $__ClangMajorVersion "$__ClangMinorVersion" $platformArch "$scriptDir" $__BuildType $__CodeCoverage $scan_build $generator "$extraCmakeArguments" "$__cmakeargs"
else
echo "Invoking \"$__ProjectRoot/src/pal/tools/gen-buildsys-gcc.sh\" \"$__ProjectRoot\" $__GccMajorVersion \"$__GccMinorVersion\" $platformArch $__BuildType $__CodeCoverage $generator $extraCmakeArguments $__cmakeargs"
source "$__ProjectRoot/src/pal/tools/gen-buildsys-gcc.sh" "$__ProjectRoot" "$__GccMajorVersion" "$__CGccMinorVersion" $platformArch $__BuildType $__CodeCoverage $generator "$extraCmakeArguments" "$__cmakeargs"
echo "Invoking \"$scriptDir/gen-buildsys-gcc.sh\" \"$__ProjectRoot\" $__GccMajorVersion \"$__GccMinorVersion\" $platformArch "$scriptDir" $__BuildType $__CodeCoverage $generator $extraCmakeArguments $__cmakeargs"
source "$scriptDir/gen-buildsys-gcc.sh" "$__ProjectRoot" "$__GccMajorVersion" "$__CGccMinorVersion" $platformArch "$scriptDir" $__BuildType $__CodeCoverage $generator "$extraCmakeArguments" "$__cmakeargs"
fi
popd
fi
Expand Down Expand Up @@ -788,12 +789,24 @@ while :; do
__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=
Expand Down
78 changes: 0 additions & 78 deletions src/coreclr/src/pal/automation/automation.py

This file was deleted.

70 changes: 0 additions & 70 deletions src/coreclr/src/pal/automation/compile.py

This file was deleted.

33 changes: 0 additions & 33 deletions src/coreclr/src/pal/automation/tests.py

This file was deleted.

97 changes: 0 additions & 97 deletions src/coreclr/src/pal/automation/util.py

This file was deleted.

Loading

0 comments on commit f6cbe70

Please sign in to comment.