diff options
author | Daniel Moody <daniel.moody@mongodb.com> | 2021-05-04 09:41:14 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-05-04 15:48:35 +0000 |
commit | 00e0dd57a75e2ec51857afd38f106e3ba3c13281 (patch) | |
tree | 74edfb1cc21302baa53433f22d64df4d3760f8c1 | |
parent | e6037573ac1bae7c8b4b5dadc7daedd4b8928089 (diff) | |
download | mongo-00e0dd57a75e2ec51857afd38f106e3ba3c13281.tar.gz |
SERVER-56614 fix ninja shell dressing for windows evergreen tasks
-rw-r--r-- | SConstruct | 5 | ||||
-rw-r--r-- | etc/evergreen.yml | 33 | ||||
-rwxr-xr-x | evergreen/scons_compile.sh | 5 |
3 files changed, 23 insertions, 20 deletions
diff --git a/SConstruct b/SConstruct index a3f048035e6..41507b16786 100644 --- a/SConstruct +++ b/SConstruct @@ -1580,6 +1580,9 @@ link_model = get_option('link-model') if link_model == "auto": link_model = "static" +if link_model.startswith('dynamic') and get_option('install-action') == 'symlink': + env.FatalError(f"Options '--link-model={link_model}' not supported with '--install-action={get_option('install-action')}'.") + # libunwind configuration. # In which the following globals are set and normalized to bool: # - use_libunwind @@ -2039,7 +2042,7 @@ if link_model.startswith("dynamic"): if env['_LIBDEPS'] == '$_LIBDEPS_LIBS': # The following platforms probably aren't using the binutils # toolchain, or may be using it for the archiver but not the - # linker, and binutils currently is the olny thing that supports + # linker, and binutils currently is the only thing that supports # thin archives. Don't even try on those platforms. if not env.TargetOSIs('solaris', 'darwin', 'windows', 'openbsd'): env.Tool('thin_archive') diff --git a/etc/evergreen.yml b/etc/evergreen.yml index 134426f616f..5772e2ef50d 100644 --- a/etc/evergreen.yml +++ b/etc/evergreen.yml @@ -2859,31 +2859,33 @@ tasks: commands: - func: "scons compile" vars: - task_install_action: - default task_compile_flags: >- --ninja targets: - build.ninja + generate-ninja - command: shell.exec params: working_dir: src shell: bash script: | + set -o errexit + set -o verbose + ${activate_virtualenv} + python -m pip install ninja if [ "Windows_NT" = "$OS" ]; then vcvars="$(vswhere -latest -property installationPath | tr '\\' '/' | dos2unix.exe)/VC/Auxiliary/Build/" - cd "$vcvars" && cmd /K "vcvarsall.bat amd64 && cd ${workdir}\src" + echo "call \"$vcvars/vcvarsall.bat\" amd64" > msvc.bat + echo "ninja install-core" >> msvc.bat + cmd /C msvc.bat + else + ninja install-core fi - python -m pip install ninja - ninja install-core - name: compile_ninja_next commands: - func: "scons compile" vars: - task_install_action: - default task_compile_flags: >- --build-tools=next --ninja @@ -2894,21 +2896,24 @@ tasks: working_dir: src shell: bash script: | + set -o errexit + set -o verbose + ${activate_virtualenv} + python -m pip install ninja if [ "Windows_NT" = "$OS" ]; then vcvars="$(vswhere -latest -property installationPath | tr '\\' '/' | dos2unix.exe)/VC/Auxiliary/Build/" - cd "$vcvars" && cmd /K "vcvarsall.bat amd64 && cd ${workdir}\src" + echo "call \"$vcvars/vcvarsall.bat\" amd64" > msvc.bat + echo "ninja install-core" >> msvc.bat + cmd /C msvc.bat + else + ninja install-core fi - python -m pip install ninja - ninja install-core - - name: compile_build_tools_next commands: - func: "scons compile" vars: - task_install_action: - default task_compile_flags: >- --build-tools=next targets: diff --git a/evergreen/scons_compile.sh b/evergreen/scons_compile.sh index a69c07b29e1..1e2623487a0 100755 --- a/evergreen/scons_compile.sh +++ b/evergreen/scons_compile.sh @@ -58,11 +58,6 @@ else extra_args="$extra_args --release" fi -if [ "Windows_NT" = "$OS" ]; then - vcvars="$(vswhere -latest -property installationPath | tr '\\' '/' | dos2unix.exe)/VC/Auxiliary/Build/" - export PATH="$(echo "$(cd "$vcvars" && cmd /C "vcvarsall.bat amd64 && C:/cygwin/bin/bash -c 'echo \$PATH'")" | tail -n +6)":$PATH -fi - activate_venv eval ${compile_env} $python ./buildscripts/scons.py \ |