diff options
author | Daniel Moody <daniel.moody@mongodb.com> | 2022-08-29 21:30:40 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-10-05 04:34:17 +0000 |
commit | 51ad1434f48be678013e321fb8a7db279ef295af (patch) | |
tree | 539a167248cc6995c9280f302b1c3b16a58c7e51 | |
parent | 0c6875e3b3daa7adf8ae75fd68b2002c1409bb43 (diff) | |
download | mongo-51ad1434f48be678013e321fb8a7db279ef295af.tar.gz |
SERVER-69133 remove redundant setting of hardlink install action.
(cherry picked from commit c1adfd31dfb0780155e7da768dbbd3e1cc4b9705)
-rwxr-xr-x | SConstruct | 21 | ||||
-rw-r--r-- | etc/evergreen_yml_components/definitions.yml | 14 | ||||
-rw-r--r-- | etc/expansions.default.yml | 1 | ||||
-rwxr-xr-x | evergreen/scons_compile.sh | 9 |
4 files changed, 12 insertions, 33 deletions
diff --git a/SConstruct b/SConstruct index 020c6c266ae..95431885c26 100755 --- a/SConstruct +++ b/SConstruct @@ -5335,11 +5335,20 @@ if get_option('ninja') != 'disabled': return dependencies env['NINJA_REGENERATE_DEPS'] = ninja_generate_deps + + if env.TargetOSIs('windows'): + # The /b option here will make sure that windows updates the mtime + # when copying the file. This allows to not need to use restat for windows + # copy commands. + copy_install_cmd = "cmd.exe /c copy /b $in $out 1>NUL" + else: + copy_install_cmd = "install $in $out" + if env.GetOption('install-action') == 'hardlink': if env.TargetOSIs('windows'): - install_cmd = "cmd.exe /c mklink /h $out $in 1>nul" + install_cmd = f"cmd.exe /c mklink /h $out $in 1>nul || {copy_install_cmd}" else: - install_cmd = "ln $in $out" + install_cmd = f"ln $in $out || {copy_install_cmd}" elif env.GetOption('install-action') == 'symlink': @@ -5371,13 +5380,7 @@ if get_option('ninja') != 'disabled': install_cmd = "ln -s $relpath $out" else: - if env.TargetOSIs('windows'): - # The /b option here will make sure that windows updates the mtime - # when copying the file. This allows to not need to use restat for windows - # copy commands. - install_cmd = "cmd.exe /c copy /b $in $out 1>NUL" - else: - install_cmd = "install $in $out" + install_cmd = copy_install_cmd env.NinjaRule("INSTALL", install_cmd, description="Installed $out", pool="install_pool") diff --git a/etc/evergreen_yml_components/definitions.yml b/etc/evergreen_yml_components/definitions.yml index 44cbf4033c0..7b855fab0c3 100644 --- a/etc/evergreen_yml_components/definitions.yml +++ b/etc/evergreen_yml_components/definitions.yml @@ -2308,8 +2308,6 @@ tasks: vars: generating_for_ninja: true separate_debug: off - task_install_action: - default task_compile_flags: >- --ninja - *f_expansions_write @@ -2327,8 +2325,6 @@ tasks: vars: generating_for_ninja: true separate_debug: off - task_install_action: - default task_compile_flags: >- --build-profile=default --variables-files=etc/scons/mongodbtoolchain_v3_gcc.vars @@ -2348,8 +2344,6 @@ tasks: vars: generating_for_ninja: true separate_debug: off - task_install_action: - default task_compile_flags: >- --build-profile=opt CCACHE= @@ -2369,8 +2363,6 @@ tasks: vars: generating_for_ninja: true separate_debug: off - task_install_action: - default task_compile_flags: >- --build-profile=fast CCACHE= @@ -2390,8 +2382,6 @@ tasks: vars: generating_for_ninja: true separate_debug: off - task_install_action: - default task_compile_flags: >- --build-profile=san CCACHE= @@ -2411,8 +2401,6 @@ tasks: vars: generating_for_ninja: true separate_debug: off - task_install_action: - default task_compile_flags: >- --build-tools=next --ninja @@ -3058,8 +3046,6 @@ tasks: vars: targets: archive-mongo-crypt-shlib-test compiling_for_test: true - task_install_action: - default task_compile_flags: >- --allocator=system --enable-free-mon=off diff --git a/etc/expansions.default.yml b/etc/expansions.default.yml index 2ddbe84a0c6..abc72b2141b 100644 --- a/etc/expansions.default.yml +++ b/etc/expansions.default.yml @@ -37,5 +37,4 @@ install_directory: /data/mongo-install-directory num_scons_link_jobs_available: "0.25" scons_cache_mode: nolinked show_scons_timings: "true" -task_install_action: hardlink separate_debug: "on" diff --git a/evergreen/scons_compile.sh b/evergreen/scons_compile.sh index 9c7dc6bb16c..91d1f363945 100755 --- a/evergreen/scons_compile.sh +++ b/evergreen/scons_compile.sh @@ -8,15 +8,6 @@ set -o verbose rm -rf ${install_directory} -# Use hardlinks to reduce the disk space impact of installing -# all of the binaries and associated debug info. - -# The expansion here is a workaround to let us set a different install-action -# for tasks that don't support the one we set here. A better plan would be -# to support install-action for Ninja builds directly. -# TODO: https://jira.mongodb.org/browse/SERVER-48203 -extra_args="--install-action=${task_install_action}" - # By default, limit link jobs to one quarter of our overall -j # concurrency unless locally overridden. We do this because in # static link environments, the memory consumption of each |