[interp] Optimize ldsflda opcode
[mono-project.git] / msvc / mono-sgen-msvc.sh
blob03757366d096c01604f073bf70378d8c2eeb190f
1 #!/bin/bash
3 # Wrapper that can be used as MONO_EXECUTABLE_WRAPPER in mono-wrapper when running MSVC build
4 # mono-sgen.exe. Simplify the setup of VS and MSVC toolchain, primarly when running MSVC build
5 # mono-sgen.exe as AOT compiler, since it needs to locate libraries as well as ClangC2 and linker
6 # from VS MSVC for corresponding architecture.
8 # NOTE, MSVC build mono-sgen.exe AOT compiler currently support 64-bit AMD codegen. mono-sgen-msvc.bat will ony setup
9 # amd64 versions of VS MSVC build environment and corresponding ClangC2 compiler.
11 # Optimization, only run full build environment when running mono-sgen.exe as AOT compiler.
12 # If not, just run mono-sgen.exe with supplied arguments.
14 MONO_SGEN_MSVC_SCRIPT_PATH=$(cd "$(dirname "$0")"; pwd)
16 if [[ "$@" != *"--aot="* ]]; then
17 "$MONO_SGEN_MSVC_SCRIPT_PATH/mono-sgen.exe" "$@"
18 else
19 MONO_SGEN_MSVC_SCRIPT_PATH=$(cygpath -w "$MONO_SGEN_MSVC_SCRIPT_PATH/mono-sgen-msvc.bat")
20 "$WINDIR/System32/cmd.exe" /c "$MONO_SGEN_MSVC_SCRIPT_PATH" "$@"