Created
January 23, 2019 09:41
-
-
Save kg/33b159824ebc7989f6dc1faf37ff2b93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# usage: start-compiler-server.sh <working directory> <log path> <pipename> | |
# ensure that VBCS_RUNTIME and VBCS_LOCATION environment variables are set. | |
set -u | |
set -e | |
if [ -s "$VBCS_LOCATION" ]; then | |
cd $1 | |
echo "RoslynCommandLineLogFile=$2 $VBCS_RUNTIME --gc-params=nursery-size=64m $VBCS_LOCATION -pipename:$3 &" | |
echo . > "$2" | |
RoslynCommandLineLogFile=$2 $VBCS_RUNTIME --gc-params=nursery-size=64m "$VBCS_LOCATION" -pipename:$3 & | |
RESULT=$? | |
if [ $RESULT -eq 0 ]; then | |
echo Compiler server started with PID $!. | |
else | |
echo Failed to start compiler server. | |
fi; | |
else | |
echo No compiler server found at path "$VBCS_LOCATION". Ensure that VBCS_LOCATION is set in config.make or passed as a parameter to make. | |
echo Use ENABLE_COMPILER_SERVER=0 to disable the use of the compiler server and continue to build. | |
exit 1 | |
fi; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment