From 2004757cbaa4085c491b4401bb63a091defe5adf Mon Sep 17 00:00:00 2001 From: Alonso Schaich Date: Tue, 27 Feb 2024 17:41:53 +0900 Subject: [PATCH] [bootstrap-vcpkg.sh] Test for ${CC} rather than gcc on systems using vcpkgUseSystem (#36828) Fixes #36807 --- scripts/bootstrap.sh | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index ff0714dc5a..cefe72781a 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -102,20 +102,12 @@ fi if [ "$UNAME" = "OpenBSD" ]; then vcpkgUseSystem="ON" - - if [ -z "$CXX" ]; then - CXX=/usr/bin/clang++ - fi - if [ -z "$CC" ]; then - CC=/usr/bin/clang - fi fi if [ "$vcpkgUseSystem" = "ON" ]; then vcpkgCheckRepoTool cmake vcpkgCheckRepoTool ninja vcpkgCheckRepoTool git - vcpkgCheckRepoTool gcc fi vcpkgCheckEqualFileHash() @@ -200,27 +192,6 @@ fi if [ "$vcpkgDownloadTool" = "ON" ]; then vcpkgDownloadFile "https://github.com/microsoft/vcpkg-tool/releases/download/$VCPKG_TOOL_RELEASE_TAG/$vcpkgToolName" "$vcpkgRootDir/vcpkg" $vcpkgToolReleaseSha else - if [ "x$CXX" = "x" ]; then - if which g++-12 >/dev/null 2>&1; then - CXX=g++-12 - elif which g++-11 >/dev/null 2>&1; then - CXX=g++-11 - elif which g++-10 >/dev/null 2>&1; then - CXX=g++-10 - elif which g++-9 >/dev/null 2>&1; then - CXX=g++-9 - elif which g++-8 >/dev/null 2>&1; then - CXX=g++-8 - elif which g++-7 >/dev/null 2>&1; then - CXX=g++-7 - elif which g++-6 >/dev/null 2>&1; then - CXX=g++-6 - elif which g++ >/dev/null 2>&1; then - CXX=g++ - fi - # If we can't find g++, allow CMake to do the look-up - fi - vcpkgToolReleaseTarball="$VCPKG_TOOL_RELEASE_TAG.tar.gz" vcpkgToolUrl="https://github.com/microsoft/vcpkg-tool/archive/$vcpkgToolReleaseTarball" baseBuildDir="$vcpkgRootDir/buildtrees/_vcpkg" @@ -246,7 +217,7 @@ else cmakeConfigOptions=" $cmakeConfigOptions '-DCMAKE_JOB_POOL_COMPILE:STRING=compile' '-DCMAKE_JOB_POOL_LINK:STRING=link' '-DCMAKE_JOB_POOLS:STRING=compile=$VCPKG_MAX_CONCURRENCY;link=$VCPKG_MAX_CONCURRENCY' " fi - (cd "$buildDir" && CXX="$CXX" eval cmake "$srcDir" $cmakeConfigOptions) || exit 1 + (cd "$buildDir" && cmake "$srcDir" $cmakeConfigOptions) || exit 1 (cd "$buildDir" && cmake --build .) || exit 1 rm -rf "$vcpkgRootDir/vcpkg"