diff options
author | lateralusX <lateralusx.github@gmail.com> | 2019-05-03 15:19:14 +0300 |
---|---|---|
committer | lateralusX <lateralusx.github@gmail.com> | 2019-05-03 16:14:22 +0300 |
commit | f42c1e0a679326c00a64413b146ad44e3d507c95 (patch) | |
tree | a59bf9b680e994c52f3a505ff0afcc0956527890 /msvc/mono-sgen-msvc.sh | |
parent | 568813b93bdd3f5f000bc4bdbc88e71f8158d9ca (diff) |
Add option to restore VS build env from file.
Diffstat (limited to 'msvc/mono-sgen-msvc.sh')
-rwxr-xr-x | msvc/mono-sgen-msvc.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/msvc/mono-sgen-msvc.sh b/msvc/mono-sgen-msvc.sh index 29331667376..a7e9ba44e9b 100755 --- a/msvc/mono-sgen-msvc.sh +++ b/msvc/mono-sgen-msvc.sh @@ -37,7 +37,12 @@ function win32_format_path { MONO_SGEN_MSVC_SCRIPT_PATH=$(cd "$(dirname "$0")"; pwd) -if [[ "$@" != *"--aot="* ]]; then +MONO_AS_AOT_COMPILER=0 +if [[ "$@" =~ .*--aot[^-a-zA-Z0-9].*|.*--aot$ ]]; then + MONO_AS_AOT_COMPILER=1 +fi + +if [[ $MONO_AS_AOT_COMPILER = 0 ]]; then "$MONO_SGEN_MSVC_SCRIPT_PATH/mono-sgen.exe" "$@" else MONO_SGEN_MSVC_SCRIPT_PATH=$(win32_format_path "$MONO_SGEN_MSVC_SCRIPT_PATH/mono-sgen-msvc.bat") @@ -46,5 +51,7 @@ else if [ ! -f $WINDOWS_CMD ]; then WINDOWS_CMD=$WINDIR/System32/cmd.exe fi + + export MONO_AS_AOT_COMPILER "$WINDOWS_CMD" /c "$MONO_SGEN_MSVC_SCRIPT_PATH" "$@" fi |